lib/HTTP/OAI/PartialList.pm

filter: Statementstmt 68.0% 17 / 25 Branchbran 33.3% 2 / 6 Conditioncond 66.6% 4 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 85.7% 6 / 7 Podpod 33.3% 2 / 6 totaltotal 57.4% 31 / 54 CC 7 SCAR 15.4
CC
7
Cov
62%
generate_body
12.0
end_element
3.6
start_element
3.3
CRAP 4.7
« lib/HTTP/OAI/Metadata/OAI_Eprints.pm ↑ Summary lib/HTTP/OAI/Harvester.pm »
1 package HTTP::OAI::PartialList;
2  
3 11 @ISA = qw( HTTP::OAI::Verb );
4  
5 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 11 our $VERSION = '4.13';
8  
9 2 ▶sub resumptionToken { shift->_elem('resumptionToken',@_) }
Subroutine resumptionToken: called CC=1 SCAR=0.0
Pod undocumented
10  
11 24 ▶sub item { shift->_multi('item',@_) }
Subroutine item: called CC=1 SCAR=0.0
Pod undocumented
12  
13 sub next
14 4 ▶{
Subroutine next: called CC=1 SCAR=0.0
Pod undocumented
15 4 my( $self ) = @_;
16  
17 4 return shift @{$self->{item}};
18 }
19  
20 sub generate_body
21 0 ▶{
Subroutine generate_body: not called CC=3 SCAR=24.8
Pod undocumented
22 0 my( $self, $driver ) = @_;
23  
24 0 for($self->item)
25 {
26 0 $_->generate( $driver );
27 }
28 0 ▶ if(my $token = $self->resumptionToken)
Branch: 1 branch
BranchTrueFalseTotal
if (my $token = $self->resumptionToken) 0 0 0
29 {
30 0 $token->generate( $driver );
31 }
32 }
33  
34 sub start_element
35 226 ▶{
Subroutine start_element: called CC=3 SCAR=12.0
Pod documented
36 226 my ($self, $hash, $r) = @_;
37  
38 226 ▶ if( $hash->{Depth} == 3 && $hash->{LocalName} eq "resumptionToken" )
Branch: 1 branch
BranchTrueFalseTotal
if ($hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "resumptionToken") 0 226 226
Condition66%2/3
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "resumptionToken"
!ll&&!rl&&r
212140
MC/DC0%0/2
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "resumptionToken"
$hash->{"Depth"} == 3 $hash->{"LocalName"} eq "resumptionToken"
Truth table66%2/3
A and B
A= $hash->{"Depth"} == 3B= $hash->{"LocalName"} eq "resumptionToken"
ABresult
0X0
100
111
39 {
40 0 $self->set_handler(HTTP::OAI::ResumptionToken->new);
41 }
42  
43 226 $self->SUPER::start_element( $hash, $r );
44 }
45  
46 sub end_element
47 226 ▶{
Subroutine end_element: called CC=3 SCAR=12.7
Pod documented
48 226 my ($self, $hash, $r) = @_;
49  
50 226 $self->SUPER::end_element( $hash, $r );
51  
52 226 ▶ if( $hash->{Depth} == 3 && $hash->{LocalName} eq "resumptionToken" )
Branch: 1 branch
BranchTrueFalseTotal
if ($hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "resumptionToken") 0 226 226
Condition66%2/3
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "resumptionToken"
!ll&&!rl&&r
212140
MC/DC0%0/2
$hash->{"Depth"} == 3 and $hash->{"LocalName"} eq "resumptionToken"
$hash->{"Depth"} == 3 $hash->{"LocalName"} eq "resumptionToken"
Truth table66%2/3
A and B
A= $hash->{"Depth"} == 3B= $hash->{"LocalName"} eq "resumptionToken"
ABresult
0X0
100
111
53 {
54 0 $self->resumptionToken( $self->get_handler );
55 0 $self->set_handler( undef );
56 }
57 }
58  
59 11 1;
« lib/HTTP/OAI/Metadata/OAI_Eprints.pm ↑ Summary lib/HTTP/OAI/Harvester.pm »