Blossom/_ConstructorArgs.pm

filter: Statementstmt 92.3% 12 / 13 Branchbran 50.0% 3 / 6 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 67.8% 19 / 28 CC 5 SCAR 16.1
CC
5
Cov
73%
normalize
6.6
BEGIN
1.0
BEGIN
1.0
CRAP 5.0
« Blossom/Response.pm ↑ Summary Blossom/PaymentRequired.pm »
1 package Net::Blossom::_ConstructorArgs;
2  
3 20 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 20 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 61 ▶sub normalize {
Subroutine normalize: called CC=5 SCAR=18.9
Pod undocumented
8 61 my (@args) = @_;
9 61 ▶ return () if !@args;
Branch: 1 branch
BranchTrueFalseTotal
unless @args 0 61 61
10 0 ▶ return %{$args[0]} if @args == 1 && ref($args[0]) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if @args == 1 and ref $args[0] eq "HASH" 0 61 61
Condition33%1/3
@args == 1 and ref $args[0] eq "HASH"
!ll&&!rl&&r
6100
MC/DC0%0/2
@args == 1 and ref $args[0] eq "HASH"
@args == 1 ref $args[0] eq "HASH"
Truth table33%1/3
A and B
A= @args == 1B= ref $args[0] eq "HASH"
ABresult
0X0
100
111
11 61 ▶ croak "constructor arguments must be a hash or hash reference" if @args % 2;
Branch: 1 branch
BranchTrueFalseTotal
if @args % 2 0 61 61
12 61 return @args;
13 }
14  
15 20 1;
« Blossom/Response.pm ↑ Summary Blossom/PaymentRequired.pm »