File Coverage

blib/lib/URI/_segment.pm
Criterion Covered Total %
statement 16 17 94.1
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 21 24 87.5


line stmt bran cond sub pod time code
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     2   10 use strict;
  2         3  
  2         66  
7 2     2   6 use warnings;
  2         3  
  2         92  
8              
9 2     2   8 use URI::Escape qw(uri_unescape);
  2         2  
  2         130  
10              
11 0     0   0 use overload '""' => sub { $_[0]->[0] },
12 2     2   9 fallback => 1;
  2         2  
  2         17  
13              
14             our $VERSION = '5.34';
15              
16             sub new
17             {
18 4     4 0 4 my $class = shift;
19 4         12 my @segment = split(';', shift, -1);
20 4         8 $segment[0] = uri_unescape($segment[0]);
21 4         19 bless \@segment, $class;
22             }
23              
24             1;