File Coverage

blib/lib/Box/Calc/Role/Mailable.pm
Criterion Covered Total %
statement 9 11 81.8
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 13 16 81.2


line stmt bran cond sub pod time code
1             package Box::Calc::Role::Mailable;
2             $Box::Calc::Role::Mailable::VERSION = '1.0201';
3 10     10   7264 use strict;
  10         24  
  10         330  
4 10     10   54 use warnings;
  10         34  
  10         320  
5 10     10   50 use Moose::Role;
  10         20  
  10         83  
6              
7             =head1 NAME
8              
9             Box::Calc::Role::Mailable - Role to make an object mailable.
10              
11             =head1 VERSION
12              
13             version 1.0201
14              
15             =head1 METHODS
16              
17             This role installs these methods:
18              
19             =head2 mail_container
20              
21             Defaults to C<undef>.
22              
23             =head2 mail_size
24              
25             Defaults to 'Regular'.
26              
27             =head2 mail_machinable
28              
29             Returns C<undef>.
30              
31             =head2 mail_type
32              
33             Returns 'Package'.
34              
35             =head2 girth
36              
37             Returns y * z
38              
39             =cut
40              
41             has mail_container => (
42             is => 'rw',
43             default => undef,
44             );
45              
46             has mail_size => (
47             is => 'rw',
48             default => 'Regular',
49             );
50              
51             has mail_machinable => (
52             is => 'rw',
53             default => undef,
54             );
55              
56             has mail_type => (
57             is => 'rw',
58             default => 'Package',
59             );
60              
61             sub girth {
62 0     0 1   my $self = shift;
63 0           return $self->y * $self->z;
64             }
65              
66             has mail_pobox_flag => (
67             is => 'rw',
68             default => 'N',
69             );
70              
71             has mail_gift_flag => (
72             is => 'rw',
73             isa => 'Str',
74             default => 'N',
75             );
76              
77             has value_of_contents => (
78             is => 'rw',
79             isa => 'Num',
80             default => 0,
81             );
82              
83             has mail_service_name => (
84             is => 'rw',
85             isa => 'Str',
86             default => '',
87             );
88              
89              
90             1;