lib/HTTP/OAI/MemberMixin.pm

filter: Statementstmt 92.3% 12 / 13 Branchbran 100% 4 / 4 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 2 totaltotal 84.0% 21 / 25 CC 4 SCAR 11.5
CC
4
Cov
95%
_multi
4.0
harvester
2.0
new
1.0
CRAP 3.2
« lib/HTTP/OAI/Record.pm ↑ Summary lib/HTTP/OAI/Metadata/OAI_Identifier.pm »
1 package HTTP::OAI::MemberMixin;
2  
3 11 @ISA = qw( LWP::MemberMixin );
4  
5 11 our $VERSION = '4.13';
6  
7 sub new
8 73 ▶{
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
9 73 my( $class, %self ) = @_;
10 73 return bless \%self, $class;
11 }
12  
13 0 ▶sub harvester { shift->_elem("harvester",@_) }
Subroutine harvester: not called CC=1 SCAR=6.9
Pod undocumented
14  
15 sub _multi
16 89 ▶{
Subroutine _multi: called CC=4 SCAR=13.9
17 89 my( $self, $elem ) = splice(@_, 0, 2);
18 89 ▶ if( ref($_[0]) eq "ARRAY" )
Branch: 2 branches
BranchTrueFalseTotal
if (ref $_[0] eq 'ARRAY') { } 23 66 89
elsif (@_) { } 32 34 66
19 {
20 23 $self->{$elem} = $_[0];
21 }
22 elsif( @_ )
23 {
24 32 push @{$self->{$elem}}, @_;
25 }
26 89 ▶ return @{$self->{$elem} || []};
Condition100%2/2
$self->{$elem} || []
l!l
854
MC/DC100%1/1
$self->{$elem} || []
$self->{$elem}
Truth table100%2/2
A
A= $self->{$elem}
Aresult
11
00
27 }
28  
29 11 1;
30  
31 __END__
« lib/HTTP/OAI/Record.pm ↑ Summary lib/HTTP/OAI/Metadata/OAI_Identifier.pm »