blib/lib/Template/Plugin/URI.pm untested

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