| 1 | package URI::_segment; | ||
| 2 | |||
| 3 | # Represents a generic path_segment so that it can be treated as | ||
| 4 | # a string too. | ||
| 5 | |||
| 6 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 2 | ▶ | use URI::Escape qw(uri_unescape); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | use overload | ||
| 12 | 0 | ▶ | '""' => sub { $_[0]->[0] }, |
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 13 | 2 | fallback => 1; | |
| 14 | |||
| 15 | 2 | our $VERSION = '5.40'; | |
| 16 | |||
| 17 | 4 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 18 | 4 | my $class = shift; | |
| 19 | 4 | my @segment = split(';', shift, -1); | |
| 20 | 4 | $segment[0] = uri_unescape($segment[0]); | |
| 21 | 4 | bless \@segment, $class; | |
| 22 | } | ||
| 23 | |||
| 24 | 2 | 1; | |