CPI.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 93.3% 28 / 30 CC 3 SCAR 6.9
CC
3
Cov
96%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« CPI/Role/Account/Business.pm ↑ Summary CPI/Role/Receiver.pm »
1 package Business::CPI;
2 # ABSTRACT: Common Payment Interface
3  
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use Class::Load ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 our $VERSION = '0.924'; # VERSION
9  
10 5 ▶sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
11 5 my $class = shift;
12  
13 5 ▶ my %data = ref $_[0] && ref $_[0] eq 'HASH' ? %{ $_[0] } : @_;
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] && ref $_[0] eq 'HASH' ? : 1 4 5
Condition66%2/3
ref $_[0] and ref $_[0] eq "HASH"
!ll&&!rl&&r
401
MC/DC50%1/2
ref $_[0] and ref $_[0] eq "HASH"
ref $_[0] ref $_[0] eq "HASH"
Truth table66%2/3
A and B
A= ref $_[0]B= ref $_[0] eq "HASH"
ABresult
0X0
100
111
14  
15 5 my $gateway = delete $data{gateway};
16 5 my $gateway_class = "Business::CPI::Gateway::$gateway";
17  
18 5 Class::Load::load_class($gateway_class);
19  
20 5 return $gateway_class->new(%data);
21 }
22  
23 5 1;
24  
25 __END__
« CPI/Role/Account/Business.pm ↑ Summary CPI/Role/Receiver.pm »