Elemental.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 50.0% 1 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 84.8% 28 / 33 CC 3 SCAR 6.6
CC
3
Cov
88%
parser
3.2
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« Elemental/Document.pm ↑ Summary Elemental/Characters.pm »
1 package XML::Elemental;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 $VERSION = '2.11';
7  
8 3 ▶use XML::SAX;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 ▶sub parser {
Subroutine parser: called CC=3 SCAR=11.6
Pod documented
11 3 my $handler;
12 3 ▶ if ($_[1] && ref($_[1]) ne 'HASH') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1] and ref $_[1] ne 'HASH') { } 0 3 3
Condition66%2/3
$_[1] and ref $_[1] ne "HASH"
!ll&&!rl&&r
210
MC/DC0%0/2
$_[1] and ref $_[1] ne "HASH"
$_[1] ref $_[1] ne "HASH"
Truth table66%2/3
A and B
A= $_[1]B= ref $_[1] ne "HASH"
ABresult
0X0
100
111
13 0 $handler = $_[1];
14 }
15 else {
16 3 require XML::Elemental::SAXHandler;
17 3 $handler = XML::Elemental::SAXHandler->new($_[1]);
18 }
19 3 XML::SAX::ParserFactory->parser(Handler => $handler);
20 }
21  
22 3 1;
23  
24 __END__
« Elemental/Document.pm ↑ Summary Elemental/Characters.pm »