Simple/Parser/XML/Lite.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod 100% 2 / 2 totaltotal 82.0% 32 / 39 CC 2 SCAR 3.3
CC
2
Cov
86%
new
2.0
parse_response
2.0
BEGIN
1.0
CRAP 1.4
« Simple/Parser/JSON.pm ↑ Summary Simple/Parser/XML/Simple.pm »
1 package WebService::Simple::Parser::XML::Lite;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use base qw(WebService::Simple::Parser);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use XML::Parser::Lite::Tree;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use XML::Parser::Lite::Tree::XPath;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 __PACKAGE__->mk_accessors($_) for qw(lite);
9  
10 sub new
11 1 ▶{
Subroutine new: called CC=2 SCAR=7.1
Pod documented
12 1 my $class = shift;
13 1 my %args = @_;
14  
15 1 ▶ my $lite = delete $args{lite} || XML::Parser::Lite::Tree::instance();
Condition33%1/3
delete $args{'lite'} || XML::Parser::Lite::Tree::instance()
l!l&&r!l&&!r
010
MC/DC0%0/2
delete $args{'lite'} || XML::Parser::Lite::Tree::instance()
delete $args{'lite'} XML::Parser::Lite::Tree::instance()
Truth table33%1/3
A || B
A= delete $args{'lite'}B= XML::Parser::Lite::Tree::instance()
ABresult
1X1
011
000
16 1 my $self = $class->SUPER::new(%args);
17 1 $self->{lite} = $lite;
18 1 return $self;
19 }
20  
21 sub parse_response
22 0 ▶{
Subroutine parse_response: not called CC=1 SCAR=6.9
Pod documented
23 0 my $self = shift;
24 XML::Parser::Lite::Tree::XPath->new(
25 0 $self->{lite}->parse( $_[0]->decoded_content ) );
26 }
27  
28 1 1;
29  
30 __END__
« Simple/Parser/JSON.pm ↑ Summary Simple/Parser/XML/Simple.pm »