home *** CD-ROM | disk | FTP | other *** search
/ ftp.f-secure.com / 2014.06.ftp.f-secure.com.tar / ftp.f-secure.com / support / hotfix / fsis / IS-SpamControl.fsfix / iufssc / lib / URI / _segment.pm < prev    next >
Text File  |  2006-11-29  |  377b  |  21 lines

  1. package URI::_segment;
  2.  
  3. # Represents a generic path_segment so that it can be treated as
  4. # a string too.
  5.  
  6. use strict;
  7. use URI::Escape qw(uri_unescape);
  8.  
  9. use overload '""' => sub { $_[0]->[0] },
  10.              fallback => 1;
  11.  
  12. sub new
  13. {
  14.     my $class = shift;
  15.     my @segment = split(';', shift, -1);
  16.     $segment[0] = uri_unescape($segment[0]);
  17.     bless \@segment, $class;
  18. }
  19.  
  20. 1;
  21.