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   14 use strict;
  2         4  
  2         69  
7 2     2   10 use warnings;
  2         3  
  2         58  
8              
9 2     2   10 use URI::Escape qw(uri_unescape);
  2         12  
  2         184  
10              
11 0     0   0 use overload '""' => sub { $_[0]->[0] },
12 2     2   14 fallback => 1;
  2         4  
  2         38  
13              
14             our $VERSION = '5.20';
15              
16             sub new
17             {
18 4     4 0 7 my $class = shift;
19 4         15 my @segment = split(';', shift, -1);
20 4         18 $segment[0] = uri_unescape($segment[0]);
21 4         55 bless \@segment, $class;
22             }
23              
24             1;