diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-07-25 01:06:42 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-07-25 01:06:42 +0000 |
commit | 9165b237ad8fae18b36d4d40d6e2ccfde7b136c7 (patch) | |
tree | 06530ddd6baa7e251c58b6b6729ed458da61a681 /lib/URI/_segment.pm | |
download | URI-tarball-URI-1.69.tar.gz |
Diffstat (limited to 'lib/URI/_segment.pm')
-rw-r--r-- | lib/URI/_segment.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/URI/_segment.pm b/lib/URI/_segment.pm new file mode 100644 index 0000000..3b27289 --- /dev/null +++ b/lib/URI/_segment.pm @@ -0,0 +1,24 @@ +package URI::_segment; + +# Represents a generic path_segment so that it can be treated as +# a string too. + +use strict; +use warnings; + +use URI::Escape qw(uri_unescape); + +use overload '""' => sub { $_[0]->[0] }, + fallback => 1; + +our $VERSION = "1.69"; + +sub new +{ + my $class = shift; + my @segment = split(';', shift, -1); + $segment[0] = uri_unescape($segment[0]); + bless \@segment, $class; +} + +1; |