Syndication/Util.pm

filter: Statementstmt 100% 20 / 20 Branchbran 75.0% 3 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 80.5% 29 / 36 SCAR 13.9
CC
4
Cov
89%
utf8_off
3.3
nodelist
2.0
BEGIN
1.0
CRAP 4.0
« Syndication/Feed.pm ↑ Summary Syndication/Source.pm »
1 package XML::Atom::Syndication::Util;
2 21 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 21 ▶use vars qw( @EXPORT_OK );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 21 @EXPORT_OK = qw( utf8_off nodelist );
6  
7 21 ▶use base qw( Exporter );
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub utf8_off {
10 111 ▶ if ($] > 5.008 && defined $_[0]) {
Subroutine utf8_off: called CC=3 SCAR=12.0
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
if ($] > "5.008" and defined $_[0]) 111 0 111
Condition33%1/3
$] > "5.008" and defined $_[0]
!ll&&!rl&&r
00111
MC/DC0%0/2
$] > "5.008" and defined $_[0]
$] > "5.008" defined $_[0]
Truth table33%1/3
A and B
A= $] > "5.008"B= defined $_[0]
ABresult
0X0
100
111
11 111 require Encode;
12 111 Encode::_utf8_off($_[0]);
13 }
14 111 $_[0];
15 }
16  
17 sub nodelist {
18 228 ▶ my ($node, $ns, $name) = @_;
Subroutine nodelist: called CC=2 SCAR=6.9
Pod undocumented
19 my @nodes =
20 794 ▶ grep { ref($_) eq 'XML::Elemental::Element' && $_->name eq "{$ns}$name" }
Branch: 1 branch
BranchTrueFalseTotal
ref $_ eq "XML::Elemental::Element" and $_->name eq "{$ns}$name" 335 459 794
21 228 @{$node->elem->contents};
22 228 @nodes;
23 }
24  
25 21 1;
« Syndication/Feed.pm ↑ Summary Syndication/Source.pm »