line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Easypost::Parcel; |
2
|
|
|
|
|
|
|
$Net::Easypost::Parcel::VERSION = '0.20'; |
3
|
6
|
|
|
6
|
|
42
|
use Moo; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
46
|
|
4
|
|
|
|
|
|
|
with qw(Net::Easypost::PostOnBuild); |
5
|
|
|
|
|
|
|
with qw(Net::Easypost::Resource); |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has [qw/length width height weight predefined_package/] => ( |
8
|
|
|
|
|
|
|
is => 'rw', |
9
|
|
|
|
|
|
|
); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub _build_fieldnames { |
12
|
6
|
|
|
6
|
|
12997
|
return [qw/length width height weight predefined_package/]; |
13
|
|
|
|
|
|
|
} |
14
|
6
|
|
|
6
|
|
1080
|
sub _build_role { 'parcel' } |
15
|
6
|
|
|
6
|
|
188
|
sub _build_operation { '/parcels' } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub clone { |
18
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return Net::Easypost::Parcel->new( |
21
|
0
|
|
|
|
|
|
map { $_ => $self->$_ } |
22
|
0
|
|
|
|
|
|
grep { defined $self->$_ } |
23
|
0
|
|
|
|
|
|
'id', @{ $self->fieldnames } |
|
0
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |