blib/lib/HTTP/OAI/MemberMixin.pm

filter: Statementstmt 92.3% 12 / 13 Branchbran 100% 6 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 2 totaltotal 83.3% 20 / 24 CC 4 SCAR 11.5
CC
4
Cov
95%
_multi
4.0
harvester
2.0
new
1.0
CRAP 3.2
« blib/lib/HTTP/OAI/Record.pm ↑ Summary blib/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.07';
6  
7 sub new
8 {
9 73 ▶ my( $class, %self ) = @_;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
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 {
17 89 ▶ my( $self, $elem ) = splice(@_, 0, 2);
Subroutine _multi: called CC=4 SCAR=13.9
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} || []};
Branch: 1 branch
BranchTrueFalseTotal
$self->{$elem} or [] 4 85 89
27 }
28  
29 11 1;
30  
31 __END__
« blib/lib/HTTP/OAI/Record.pm ↑ Summary blib/lib/HTTP/OAI/Metadata/OAI_Identifier.pm »