lib/Template/Plugin/URI.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 SCAR 11.0
CC
3
Cov
100%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Build ↑ Summary
1 package Template::Plugin::URI;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.01';
7  
8 1 ▶use URI;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use parent qw(Template::Plugin);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 sub new {
13 16 ▶ my (undef, undef, @args) = @_;
Subroutine new: called CC=3 SCAR=11.0
Pod documented
14  
15 16 ▶ my %args = (ref($args[-1]) eq 'HASH') ? %{$args[-1]} : ();
Branch: 1 branch
BranchTrueFalseTotal
ref $args[-1] eq 'HASH' ? : 1 15 16
16 16 my $uri = undef;
17  
18 16 ▶ if ($args{new_abs}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($args{'new_abs'}) { } 1 15 16
19 1 $uri = URI->new_abs(@args);
20 }
21 else {
22 15 $uri = URI->new(@args);
23 }
24  
25 16 return $uri;
26 }
27  
28 1 1;
29  
30 __END__
« Build ↑ Summary