URI/IRI.pm

filter: Statementstmt 90.0% 27 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 9 / 12 Podpod 0.0% 0 / 3 totaltotal 80.0% 36 / 45 CC 1 SCAR 0.8
CC
1
Cov
90%
clone
2.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.1
« URI/_segment.pm ↑ Summary URI/ftpes.pm »
1 package URI::IRI;
2  
3 # Experimental
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use URI ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶use overload '""' => sub { shift->as_string };
Subroutine BEGIN: called CC=1 SCAR=0.2
Subroutine __ANON__: not called CC=1 SCAR=0.2
10  
11 1 our $VERSION = '5.40';
12  
13 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
14 1 my ($class, $uri, $scheme) = @_;
15 1 utf8::upgrade($uri);
16 1 return bless {uri => URI->new($uri, $scheme),}, $class;
17 }
18  
19 0 ▶sub clone {
Subroutine clone: not called CC=1 SCAR=6.9
Pod undocumented
20 0 my $self = shift;
21 0 return bless {uri => $self->{uri}->clone,}, ref($self);
22 }
23  
24 1 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod undocumented
25 1 my $self = shift;
26 1 return $self->{uri}->as_iri;
27 }
28  
29 1 our $AUTOLOAD;
30  
31 1 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=1 SCAR=0.0
32 1 my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
33  
34 # We create the function here so that it will not need to be
35 # autoloaded the next time.
36 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
37 1 ▶ *$method = sub { shift->{uri}->$method(@_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
38 1 goto &$method;
39 }
40  
41 0 ▶sub DESTROY { } # avoid AUTOLOADing it
Subroutine DESTROY: not called CC=1 SCAR=0.0
42  
43 1 1;
« URI/_segment.pm ↑ Summary URI/ftpes.pm »