UPS/Label.pm

filter: Statementstmt 100% 18 / 18 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 96.1% 25 / 26 CC 2 SCAR 3.0
CC
2
Cov
95%
as_hash
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« UPS/Response/Image.pm ↑ Summary UPS/Rate.pm »
1 package Net::Async::Webservice::UPS::Label;
2 1 $Net::Async::Webservice::UPS::Label::VERSION = '1.1.4';
3 {
4 1 $Net::Async::Webservice::UPS::Label::DIST = 'Net-Async-Webservice-UPS';
5 }
6 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Net::Async::Webservice::UPS::Types qw(:types);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 # ABSTRACT: a label for a shipment request
12  
13  
14 1 has code => (
15 is => 'ro',
16 isa => ImageType,
17 required => 1,
18 );
19  
20  
21 3 ▶sub as_hash {
Subroutine as_hash: called CC=2 SCAR=7.2
Pod documented
22 3 my ($self) = @_;
23  
24 return {
25 3 ▶ LabelPrintMethod => {
Branch: 1 branch
BranchTrueFalseTotal
$self->code eq 'GIF' ? : 0 3 3
26 Code => $self->code,
27 },
28 ( $self->code eq 'GIF' ? (
29 HTTPUserAgent => 'Mozilla/4.5',
30 LabelImageFormat => 'GIF',
31 ) : (
32 LabelStockSize => {
33 Height => 4,
34 Width => 6,
35 },
36 ) ),
37 };
38 }
39  
40 1 1;
41  
42 __END__
« UPS/Response/Image.pm ↑ Summary UPS/Rate.pm »