FeedWriter.pm

filter: Statementstmt 66.6% 12 / 18 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 53.3% 16 / 30 CC 4 SCAR 24.7
CC
4
Cov
50%
new
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 11.9
« FeedWriter/Base.pm ↑ Summary
1 package XML::FeedWriter;
2
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6
7 2 our $VERSION = '0.06';
8
9 2 my %supported = (
10 'RSS20' => 'RSS20',
11 'RSS 2.0' => 'RSS20',
12 '2.0' => 'RSS20',
13 2 => 'RSS20', # in case version specified as a number
14 );
15
16 0 ▶sub new {
Subroutine new: not called CC=4 SCAR=30.0
Pod documented
17 0 my ($class, %options) = @_;
18
19 0 ▶ my $version = delete $options{version} || '2.0';
Condition0%0/2
delete $options{'version'} || '2.0'
l!l
00
MC/DC0%0/1
delete $options{'version'} || '2.0'
delete $options{'version'}
Truth table0%0/2
A
A= delete $options{'version'}
Aresult
11
00
20
21 0 ▶ croak "not yet supported: $version" unless $supported{$version};
Branch: 1 branch
BranchTrueFalseTotal
unless $supported{$version} 0 0 0
22
23 0 my $package = __PACKAGE__.'::'.$supported{$version};
24 0 ▶ eval "require $package;" or die $@;
Branch: 1 branch
BranchTrueFalseTotal
eval "require $package;" or die $@ 0 0 0
25
26 0 $package->new(%options);
27 }
28
29 2 1;
30
31 __END__
« FeedWriter/Base.pm ↑ Summary