lib/HTTP/OAI/ListIdentifiers.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran 83.3% 5 / 6 Conditioncond 66.6% 6 / 9 MC/DCmcdc 33.3% 2 / 6 Subroutinesub 100% 4 / 4 Podpod 100% 3 / 3 totaltotal 80.0% 36 / 45 CC 7 SCAR 13.3
CC
7
Cov
84%
end_element
5.4
start_element
3.0
BEGIN
1.0
CRAP 3.8
« lib/HTTP/OAI/Header.pm ↑ Summary lib/HTTP/OAI/MetadataFormat.pm »
1 package HTTP::OAI::ListIdentifiers;
2  
3 11 @ISA = qw( HTTP::OAI::PartialList );
4  
5 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 11 our $VERSION = '4.13';
8  
9 1 ▶sub identifier { shift->item(@_) }
Subroutine identifier: called CC=1 SCAR=0.0
Pod documented
10  
11 sub start_element
12 13 ▶{
Subroutine start_element: called CC=3 SCAR=11.0
Pod documented
13 13 my ($self,$hash, $r) = @_;
14  
15 13 ▶ if( $hash->{Depth} == 3 && $hash->{LocalName} eq "header" )
Branch: 1 branch
BranchTrueFalseTotal
if ($hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "header") 2 11 13
Condition66%2/3
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "header"
!ll&&!rl&&r
1102
MC/DC50%1/2
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "header"
$hash->{"Depth"} == 3 $hash->{"LocalName"} eq "header"
Truth table66%2/3
A and B
A= $hash->{"Depth"} == 3B= $hash->{"LocalName"} eq "header"
ABresult
0X0
100
111
16 {
17 2 $self->set_handler(HTTP::OAI::Header->new);
18 }
19  
20 13 $self->SUPER::start_element($hash, $r);
21 }
22  
23 13 ▶sub end_element {
Subroutine end_element: called CC=5 SCAR=16.8
Pod documented
24 13 my ($self,$hash, $r) = @_;
25  
26 13 $self->SUPER::end_element($hash);
27  
28 # OAI 1.x
29 13 ▶ if( $hash->{Depth} == 3 && $hash->{LocalName} eq "identifier" )
Branch: 2 branches
BranchTrueFalseTotal
if ($hash->{'Depth'} == 3 and $hash->{'LocalName'} eq 'identifier') { } 0 13 13
elsif ($hash->{'Depth'} == 3 and $hash->{'LocalName'} eq 'header') { } 2 22 24
Condition66%2/3
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "identifier"
!ll&&!rl&&r
1120
MC/DC0%0/2
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "identifier"
$hash->{"Depth"} == 3 $hash->{"LocalName"} eq "identifier"
Truth table66%2/3
A and B
A= $hash->{"Depth"} == 3B= $hash->{"LocalName"} eq "identifier"
ABresult
0X0
100
111
30 {
31 $r->callback(HTTP::OAI::Header->new(
32 identifier=>$hash->{Text},
33 0 datestamp=>'0000-00-00',
34 ));
35 }
36 ▶ elsif( $hash->{Depth} == 3 && $hash->{LocalName} eq "header" )
Condition66%2/3
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "header"
!ll&&!rl&&r
1102
MC/DC50%1/2
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "header"
$hash->{"Depth"} == 3 $hash->{"LocalName"} eq "header"
Truth table66%2/3
A and B
A= $hash->{"Depth"} == 3B= $hash->{"LocalName"} eq "header"
ABresult
0X0
100
111
37 {
38 2 $r->callback( $self->get_handler, $self );
39 2 $self->set_handler( undef );
40 }
41 }
42  
43 11 1;
44  
45 __END__
« lib/HTTP/OAI/Header.pm ↑ Summary lib/HTTP/OAI/MetadataFormat.pm »