line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Parse::SAMGov::Entity::Address; |
2
|
|
|
|
|
|
|
$Parse::SAMGov::Entity::Address::VERSION = '0.106'; |
3
|
4
|
|
|
4
|
|
13
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
96
|
|
4
|
4
|
|
|
4
|
|
11
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
80
|
|
5
|
4
|
|
|
4
|
|
60
|
use 5.010; |
|
4
|
|
|
|
|
10
|
|
6
|
4
|
|
|
4
|
|
16
|
use Parse::SAMGov::Mo; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
30
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#ABSTRACT: Defines the Address object of the entity. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use overload |
12
|
|
|
|
|
|
|
fallback => 1, |
13
|
|
|
|
|
|
|
'""' => sub { |
14
|
47
|
|
|
47
|
|
64
|
my $str = ''; |
15
|
47
|
100
|
|
|
|
75
|
$str .= $_[0]->address . ', ' if length $_[0]->address; |
16
|
47
|
100
|
|
|
|
106
|
$str .= $_[0]->city if length $_[0]->city; |
17
|
47
|
100
|
|
|
|
72
|
$str .= ', ' . $_[0]->state if length $_[0]->state; |
18
|
47
|
100
|
|
|
|
75
|
$str .= ', ' . $_[0]->country if length $_[0]->country; |
19
|
47
|
100
|
|
|
|
73
|
$str .= ' - ' . $_[0]->zip if length $_[0]->zip; |
20
|
47
|
|
|
|
|
103
|
return $str; |
21
|
4
|
|
|
4
|
|
17
|
}; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
41
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'address'; |
24
|
|
|
|
|
|
|
has 'city'; |
25
|
|
|
|
|
|
|
has 'state'; |
26
|
|
|
|
|
|
|
has 'district'; |
27
|
|
|
|
|
|
|
has 'country'; |
28
|
|
|
|
|
|
|
has 'zip' => coerce => sub { |
29
|
|
|
|
|
|
|
chop $_[0] if ($_[0] =~ /-$/); |
30
|
|
|
|
|
|
|
return $_[0]; |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=encoding UTF-8 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Parse::SAMGov::Entity::Address - Defines the Address object of the entity. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 0.106 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my $addr = Parse::SAMGov::Entity::Address->new( |
50
|
|
|
|
|
|
|
address => '123 Baker Street, Suite 1A', |
51
|
|
|
|
|
|
|
city => 'Boringville', |
52
|
|
|
|
|
|
|
state => 'ZB', |
53
|
|
|
|
|
|
|
country => 'USA', |
54
|
|
|
|
|
|
|
zip => '21900-1234', |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 METHODS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 new |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Creates a new Address object for the entity or individual. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 address |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This fields holds the address information without the city/state/country and |
66
|
|
|
|
|
|
|
postal/zip code. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 city |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
The city name of the entity's address. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 state |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
The state or province of the entity's address. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 district |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
The congressional district number of the entity's address. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 country |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
The three character country code for the entity's address. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 zip |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
The zip or postal code of the entity's address. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 AUTHOR |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Vikas N Kumar |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Selective Intellect LLC. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
97
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
__END__ |