home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _0ebeb7b5c47e882ad34e2ffc260b6097 < prev    next >
Encoding:
Text File  |  2004-06-01  |  397 b   |  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.