line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Easypost::Parcel; |
2
|
|
|
|
|
|
|
$Net::Easypost::Parcel::VERSION = '0.23'; |
3
|
6
|
|
|
6
|
|
35
|
use Moo; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
28
|
|
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
|
|
13418
|
return [qw/length width height weight predefined_package/]; |
13
|
|
|
|
|
|
|
} |
14
|
6
|
|
|
6
|
|
1032
|
sub _build_role { 'parcel' } |
15
|
6
|
|
|
6
|
|
148
|
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__ |