Easypost/Parcel.pm

filter: Statementstmt 68.7% 11 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 72.7% 16 / 22 SCAR 0.3
CC
1
Cov
69%
clone
2.0
BEGIN
1.0
_build_fieldnames
1.0
CRAP 1.0
« Easypost/PostOnBuild.pm ↑ Summary Easypost/Rate.pm »
1 package Net::Easypost::Parcel;
2 6 $Net::Easypost::Parcel::VERSION = '0.20';
3 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 with qw(Net::Easypost::PostOnBuild);
5 6 with qw(Net::Easypost::Resource);
6  
7 6 has [qw/length width height weight predefined_package/] => (
8 is => 'rw',
9 );
10  
11 sub _build_fieldnames {
12 6 ▶ return [qw/length width height weight predefined_package/];
Subroutine _build_fieldnames: called CC=1 SCAR=0.0
13 }
14 6 ▶sub _build_role { 'parcel' }
Subroutine _build_role: called CC=1 SCAR=0.0
15 6 ▶sub _build_operation { '/parcels' }
Subroutine _build_operation: called CC=1 SCAR=0.0
16  
17 sub clone {
18 0 ▶ my ($self) = @_;
Subroutine clone: not called CC=1 SCAR=6.9
Pod documented
19  
20 return Net::Easypost::Parcel->new(
21 0 map { $_ => $self->$_ }
22 0 grep { defined $self->$_ }
23 0 'id', @{ $self->fieldnames }
24 );
25 }
26  
27 6 1;
28  
29 __END__
« Easypost/PostOnBuild.pm ↑ Summary Easypost/Rate.pm »