UPS/Shipper.pm

filter: Statementstmt 92.5% 25 / 27 Branchbran 50.0% 1 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 85.7% 6 / 7 Podpod 100% 2 / 2 totaltotal 82.9% 34 / 41 CC 3 SCAR 8.5
CC
3
Cov
84%
cache_id
6.0
as_hash
2.0
BEGIN
1.0
CRAP 2.3
« UPS/CreditCard.pm ↑ Summary UPS/Response/QV/Generic.pm »
1 package Net::Async::Webservice::UPS::Shipper;
2 5 $Net::Async::Webservice::UPS::Shipper::VERSION = '1.1.4';
3 {
4 5 $Net::Async::Webservice::UPS::Shipper::DIST = 'Net-Async-Webservice-UPS';
5 }
6 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use Types::Standard qw(Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use Net::Async::Webservice::UPS::Types ':types';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 extends 'Net::Async::Webservice::UPS::Contact';
11 5 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 # ABSTRACT: a contact with an account number
14  
15  
16 5 has account_number => (
17 is => 'ro',
18 isa => Str,
19 );
20  
21  
22 6 ▶sub as_hash {
Subroutine as_hash: called CC=2 SCAR=7.0
Pod documented
23 6 my ($self,$shape) = @_;
24  
25 6 my $ret = $self->next::method($shape);
26 6 ▶ if ($self->account_number) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->account_number) 6 0 6
27 6 $ret->{ShipperNumber} = $self->account_number;
28 }
29 6 return $ret;
30 }
31  
32  
33 0 ▶sub cache_id {
Subroutine cache_id: not called CC=2 SCAR=17.9
Pod documented
34 0 my ($self) = @_;
35  
36 0 ▶ return join ':',
Condition0%0/2
$self->account_number || ''
l!l
00
MC/DC0%0/1
$self->account_number || ''
$self->account_number
Truth table0%0/2
A
A= $self->account_number
Aresult
11
00
37 ($self->account_number||''),
38 $self->address->cache_id;
39 }
40  
41 5 1;
42  
43 __END__
« UPS/CreditCard.pm ↑ Summary UPS/Response/QV/Generic.pm »