blib/lib/Template/Plugin/XML/Feed.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 85.7% 24 / 28 CC 3 SCAR 8.5
CC
3
Cov
82%
new
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
↑ Summary
1 package Template::Plugin::XML::Feed;
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 base 'Template::Plugin';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use XML::Feed;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our $VERSION = '1.0.3';
9  
10 6 ▶sub new {
Subroutine new: called CC=3 SCAR=14.2
Pod documented
11 6 my ($class, $context, $filename) = @_;
12  
13 6 ▶ return $class->fail('No filename specified')
Branch: 1 branch
BranchTrueFalseTotal
unless $filename 0 6 6
14 unless $filename;
15
16 6 ▶ my $feed = XML::Feed->parse($filename)
Branch: 1 branch
BranchTrueFalseTotal
my $feed = "XML::Feed"->parse($filename) or return $class->error("failed to create XML::Feed") 0 0 0
17 or return $class->error('failed to create XML::Feed');
18  
19 0 return $feed;
20 }
21  
22 2 1;
23  
24 __END__
↑ Summary