| 1 | package Box::Calc::Role::Mailable; | ||
| 2 | 11 | $Box::Calc::Role::Mailable::VERSION = '1.0205'; | |
| 3 | 11 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 11 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 11 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Box::Calc::Role::Mailable - Role to make an object mailable. | ||
| 10 | |||
| 11 | =head1 VERSION | ||
| 12 | |||
| 13 | version 1.0205 | ||
| 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 | 11 | has mail_container => ( | |
| 42 | is => 'rw', | ||
| 43 | default => undef, | ||
| 44 | ); | ||
| 45 | |||
| 46 | 11 | has mail_size => ( | |
| 47 | is => 'rw', | ||
| 48 | default => 'Regular', | ||
| 49 | ); | ||
| 50 | |||
| 51 | 11 | has mail_machinable => ( | |
| 52 | is => 'rw', | ||
| 53 | default => undef, | ||
| 54 | ); | ||
| 55 | |||
| 56 | 11 | has mail_type => ( | |
| 57 | is => 'rw', | ||
| 58 | default => 'Package', | ||
| 59 | ); | ||
| 60 | |||
| 61 | sub girth { | ||
| 62 | 0 | ▶ | my $self = shift; |
|
Subroutine
girth: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 63 | 0 | return $self->y * $self->z; | |
| 64 | } | ||
| 65 | |||
| 66 | 11 | has mail_pobox_flag => ( | |
| 67 | is => 'rw', | ||
| 68 | default => 'N', | ||
| 69 | ); | ||
| 70 | |||
| 71 | 11 | has mail_gift_flag => ( | |
| 72 | is => 'rw', | ||
| 73 | isa => 'Str', | ||
| 74 | default => 'N', | ||
| 75 | ); | ||
| 76 | |||
| 77 | 11 | has value_of_contents => ( | |
| 78 | is => 'rw', | ||
| 79 | isa => 'Num', | ||
| 80 | default => 0, | ||
| 81 | ); | ||
| 82 | |||
| 83 | 11 | has mail_service_name => ( | |
| 84 | is => 'rw', | ||
| 85 | isa => 'Str', | ||
| 86 | default => '', | ||
| 87 | ); | ||
| 88 | |||
| 89 | |||
| 90 | 11 | 1; | |