Commit | Line | Data |
---|---|---|
3fea05b9 | 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; |