UPS/Response/Address.pm

filter: Statementstmt 92.3% 24 / 26 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 78.0% 32 / 41 CC 4 SCAR 11.0
CC
4
Cov
82%
BUILDARGS
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« UPS/Contact.pm ↑ Summary UPS/Response/Rate.pm »
1 package Net::Async::Webservice::UPS::Response::Address;
2 5 $Net::Async::Webservice::UPS::Response::Address::VERSION = '1.1.4';
3 {
4 5 $Net::Async::Webservice::UPS::Response::Address::DIST = 'Net-Async-Webservice-UPS';
5 }
6 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use Types::Standard qw(ArrayRef HashRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use Net::Async::Webservice::UPS::Types qw(:types);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 5 extends 'Net::Async::Webservice::UPS::Response';
12  
13 # ABSTRACT: response for validate_address
14  
15  
16 5 has addresses => (
17 is => 'ro',
18 isa => ArrayRef[Address],
19 required => 1,
20 );
21  
22 4 ▶sub BUILDARGS {
Subroutine BUILDARGS: called CC=4 SCAR=16.1
Pod undocumented
23 4 my ($class,$hashref) = @_;
24 0 ▶ if (@_>2) { shift; $hashref={@_} };
Branch: 1 branch
BranchTrueFalseTotal
if (@_ > 2) 0 4 4
25  
26 4 my $ret = $class->next::method($hashref);
27  
28 4 ▶ if ($hashref->{addresses} and not $ret->{addresses}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($hashref->{"addresses"} and not $ret->{"addresses"}) 4 0 4
Condition33%1/3
$hashref->{"addresses"} and not $ret->{"addresses"}
!ll&&!rl&&r
004
MC/DC0%0/2
$hashref->{"addresses"} and not $ret->{"addresses"}
$hashref->{"addresses"} not $ret->{"addresses"}
Truth table33%1/3
A and not(B)
A= $hashref->{"addresses"}B= not $ret->{"addresses"}
ABresult
0X0
100
111
29 4 $ret->{addresses} = $hashref->{addresses};
30 }
31  
32 4 return $ret;
33 }
34  
35 5 1;
36  
37 __END__
« UPS/Contact.pm ↑ Summary UPS/Response/Rate.pm »