From 9165b237ad8fae18b36d4d40d6e2ccfde7b136c7 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sat, 25 Jul 2015 01:06:42 +0000 Subject: URI-1.69 --- lib/URI/_segment.pm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/URI/_segment.pm (limited to 'lib/URI/_segment.pm') 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; -- cgit v1.2.1