line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WhoisNG::Person; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#use 5.008004; |
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1751
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
12
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
13
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# This allows declaration use Net::WhoisNG::Person ':all'; |
16
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
17
|
|
|
|
|
|
|
# will save memory. |
18
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
) ] ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
our @EXPORT = qw( |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub new{ |
32
|
3
|
|
|
3
|
0
|
6
|
my $class=shift; |
33
|
3
|
|
|
|
|
7
|
my $self={}; |
34
|
3
|
|
|
|
|
7
|
$self->{"det_creds"} = (); |
35
|
3
|
|
|
|
|
10
|
bless $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub parseCredentials{ |
39
|
|
|
|
|
|
|
# Seeing as contact info is formated a gazillion dif ways |
40
|
|
|
|
|
|
|
#this sub should not be heavily relied on |
41
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub getCredentials{ |
45
|
1
|
|
|
1
|
0
|
26
|
my $self=shift; |
46
|
1
|
|
|
|
|
5
|
my @creds; |
47
|
1
|
50
|
|
|
|
13
|
if(defined($self->{credentials})){ |
|
|
50
|
|
|
|
|
|
48
|
0
|
|
|
|
|
0
|
my $tmp = $self->{credentials}; |
49
|
0
|
|
|
|
|
0
|
@creds = @$tmp; |
50
|
0
|
|
|
|
|
0
|
map(s/^\s+//, @creds); |
51
|
0
|
|
|
|
|
0
|
return \@creds; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
elsif(defined($self->getName())){ |
54
|
|
|
|
|
|
|
#assemble a credentials array |
55
|
|
|
|
|
|
|
# |
56
|
1
|
50
|
|
|
|
6
|
if(defined($self->getID())){ |
57
|
0
|
|
|
|
|
0
|
push(@creds,$self->getID()); |
58
|
|
|
|
|
|
|
} |
59
|
1
|
50
|
|
|
|
5
|
if(defined($self->getName())){ |
60
|
1
|
|
|
|
|
4
|
push(@creds,$self->getName()); |
61
|
|
|
|
|
|
|
} |
62
|
1
|
50
|
|
|
|
6
|
if(defined($self->getOrganization())){ |
63
|
1
|
|
|
|
|
4
|
push(@creds,$self->getOrganization()); |
64
|
|
|
|
|
|
|
} |
65
|
1
|
50
|
|
|
|
7
|
if(defined($self->getStreet())){ |
66
|
0
|
|
|
|
|
0
|
push(@creds,$self->getStreet()); |
67
|
|
|
|
|
|
|
} |
68
|
1
|
50
|
|
|
|
6
|
if(defined($self->getCity())){ |
69
|
1
|
|
|
|
|
4
|
push(@creds,$self->getCity()); |
70
|
|
|
|
|
|
|
} |
71
|
1
|
50
|
|
|
|
7
|
if(defined($self->getPostalCode())){ |
72
|
1
|
|
|
|
|
61
|
push(@creds,$self->getPostalCode()); |
73
|
|
|
|
|
|
|
} |
74
|
1
|
50
|
|
|
|
7
|
if(defined($self->getState())){ |
75
|
0
|
|
|
|
|
0
|
push(@creds,$self->getState()); |
76
|
|
|
|
|
|
|
} |
77
|
1
|
50
|
|
|
|
6
|
if(defined($self->getCountry())){ |
78
|
1
|
|
|
|
|
5
|
push(@creds,$self->getCountry()); |
79
|
|
|
|
|
|
|
} |
80
|
1
|
50
|
|
|
|
7
|
if(defined($self->getPhone())){ |
81
|
1
|
|
|
|
|
4
|
push(@creds,$self->getPhone()); |
82
|
|
|
|
|
|
|
} |
83
|
1
|
50
|
|
|
|
6
|
if(defined($self->getEmail())){ |
84
|
1
|
|
|
|
|
4
|
push(@creds,$self->getEmail()); |
85
|
|
|
|
|
|
|
} |
86
|
1
|
|
|
|
|
6
|
return \@creds; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub getRawHash{ |
91
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
92
|
0
|
|
|
|
|
0
|
return $self->{"det_creds"}; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub setType{ |
96
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
97
|
0
|
|
|
|
|
0
|
my $val = shift; |
98
|
0
|
|
|
|
|
0
|
chomp($val); |
99
|
0
|
|
|
|
|
0
|
$val =~ s/\s+$//; |
100
|
0
|
|
|
|
|
0
|
$self->{type}= $val; |
101
|
0
|
|
|
|
|
0
|
$self->{'det_creds'}->{type} = $self->{type}; |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub getType{ |
105
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
106
|
0
|
|
|
|
|
0
|
return $self->{type}; |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub getID{ |
111
|
1
|
|
|
1
|
0
|
3
|
my $self=shift; |
112
|
1
|
|
|
|
|
7
|
return $self->{id}; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
sub setID{ |
116
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
117
|
0
|
|
|
|
|
0
|
my $val = shift; |
118
|
0
|
|
|
|
|
0
|
chomp($val); |
119
|
0
|
|
|
|
|
0
|
$val =~ s/\s+$//; |
120
|
0
|
|
|
|
|
0
|
$self->{id}=$val; |
121
|
0
|
|
|
|
|
0
|
$self->{'det_creds'}->{ID} = $self->{ID}; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub getName{ |
125
|
4
|
|
|
4
|
0
|
187
|
my $self=shift; |
126
|
4
|
|
|
|
|
30
|
return $self->{name}; |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
sub setName{ |
130
|
6
|
|
|
6
|
0
|
10
|
my $self=shift; |
131
|
6
|
|
|
|
|
10
|
my $val = shift; |
132
|
6
|
|
|
|
|
19
|
chomp($val); |
133
|
6
|
|
|
|
|
28
|
$val =~ s/\s+$//; |
134
|
6
|
|
|
|
|
18
|
$self->{name}=$val; |
135
|
6
|
|
|
|
|
25
|
$self->{'det_creds'}->{name} = $self->{name}; |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub setOrganization{ |
139
|
6
|
|
|
6
|
0
|
16
|
my $self=shift; |
140
|
6
|
|
|
|
|
9
|
my $val = shift; |
141
|
6
|
|
|
|
|
9
|
chomp($val); |
142
|
6
|
|
|
|
|
25
|
$val =~ s/\s+$//; |
143
|
6
|
|
|
|
|
30
|
$self->{organization}=$val; |
144
|
6
|
|
|
|
|
28
|
$self->{'det_creds'}->{organization} = $self->{organization}; |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
sub getOrganization{ |
148
|
2
|
|
|
2
|
0
|
5
|
my $self=shift; |
149
|
2
|
|
|
|
|
9
|
return $self->{organization}; |
150
|
|
|
|
|
|
|
} |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
sub setStreet{ |
153
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
154
|
0
|
|
|
|
|
0
|
my $val = shift; |
155
|
0
|
|
|
|
|
0
|
chomp($val); |
156
|
0
|
|
|
|
|
0
|
$val =~ s/\s+$//; |
157
|
0
|
|
|
|
|
0
|
$self->{street}=$val; |
158
|
0
|
|
|
|
|
0
|
$self->{'det_creds'}->{street} = $self->{street}; |
159
|
|
|
|
|
|
|
} |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
sub getStreet{ |
162
|
1
|
|
|
1
|
0
|
23
|
my $self=shift; |
163
|
1
|
|
|
|
|
6
|
return $self->{street}; |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
sub setCity{ |
167
|
6
|
|
|
6
|
0
|
9
|
my $self=shift; |
168
|
6
|
|
|
|
|
10
|
my $val = shift; |
169
|
6
|
|
|
|
|
12
|
chomp($val); |
170
|
6
|
|
|
|
|
25
|
$val =~ s/\s+$//; |
171
|
6
|
|
|
|
|
15
|
$self->{city}=$val; |
172
|
6
|
|
|
|
|
23
|
$self->{'det_creds'}->{city} = $self->{city}; |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
sub getCity{ |
176
|
2
|
|
|
2
|
0
|
5
|
my $self=shift; |
177
|
2
|
|
|
|
|
8
|
return $self->{city}; |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
sub getState{ |
181
|
1
|
|
|
1
|
0
|
3
|
my $self=shift; |
182
|
1
|
|
|
|
|
7
|
return $self->{state}; |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
sub setState{ |
186
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
187
|
0
|
|
|
|
|
0
|
my $val = shift; |
188
|
0
|
|
|
|
|
0
|
chomp($val); |
189
|
0
|
|
|
|
|
0
|
$val =~ s/\s+$//; |
190
|
0
|
|
|
|
|
0
|
$self->{state}=$val; |
191
|
0
|
|
|
|
|
0
|
$self->{'det_creds'}->{state} = $self->{state}; |
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub getPostalCode{ |
195
|
2
|
|
|
2
|
0
|
4
|
my $self=shift; |
196
|
2
|
|
|
|
|
12
|
return $self->{postalcode}; |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
sub setPostalCode{ |
200
|
6
|
|
|
6
|
0
|
8
|
my $self=shift; |
201
|
6
|
|
|
|
|
9
|
my $val = shift; |
202
|
6
|
|
|
|
|
9
|
chomp($val); |
203
|
6
|
|
|
|
|
99
|
$val =~ s/\s+$//; |
204
|
6
|
|
|
|
|
16
|
$self->{postalcode}="$val"; |
205
|
6
|
|
|
|
|
23
|
$self->{'det_creds'}->{"postalcode"} = "$val"; |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
sub setCountry{ |
209
|
6
|
|
|
6
|
0
|
9
|
my $self=shift; |
210
|
6
|
|
|
|
|
11
|
my $val = shift; |
211
|
6
|
|
|
|
|
8
|
chomp($val); |
212
|
6
|
|
|
|
|
22
|
$val =~ s/\s+$//; |
213
|
6
|
|
|
|
|
13
|
$self->{country}=$val; |
214
|
6
|
|
|
|
|
19
|
$self->{'det_creds'}->{country} = $self->{country}; |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
sub getCountry{ |
218
|
2
|
|
|
2
|
0
|
4
|
my $self=shift; |
219
|
2
|
|
|
|
|
36
|
return $self->{country}; |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
sub setPhone{ |
223
|
6
|
|
|
6
|
0
|
9
|
my $self=shift; |
224
|
6
|
|
|
|
|
9
|
my $val = shift; |
225
|
6
|
|
|
|
|
11
|
chomp($val); |
226
|
6
|
|
|
|
|
25
|
$val =~ s/\s+$//; |
227
|
6
|
|
|
|
|
13
|
$self->{phone}=$val; |
228
|
6
|
|
|
|
|
24
|
$self->{'det_creds'}->{phone} = $self->{phone}; |
229
|
|
|
|
|
|
|
} |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
sub getPhone{ |
232
|
3
|
|
|
3
|
0
|
7
|
my $self=shift; |
233
|
3
|
|
|
|
|
18
|
return $self->{phone}; |
234
|
|
|
|
|
|
|
} |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
sub setFax{ |
237
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
238
|
0
|
|
|
|
|
0
|
my $val = shift; |
239
|
0
|
|
|
|
|
0
|
chomp($val); |
240
|
0
|
|
|
|
|
0
|
$val =~ s/\s+$//; |
241
|
0
|
|
|
|
|
0
|
$self->{fax}=$val; |
242
|
0
|
|
|
|
|
0
|
$self->{'det_creds'}->{fax} = $self->{fax}; |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
sub getFax{ |
246
|
0
|
|
|
0
|
0
|
0
|
my $self=shift; |
247
|
0
|
|
|
|
|
0
|
return $self->{fax}; |
248
|
|
|
|
|
|
|
} |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
sub getEmail{ |
251
|
2
|
|
|
2
|
0
|
11
|
my $self=shift; |
252
|
2
|
|
|
|
|
9
|
return $self->{email}; |
253
|
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
sub setEmail{ |
256
|
6
|
|
|
6
|
0
|
8
|
my $self=shift; |
257
|
6
|
|
|
|
|
10
|
my $val = shift; |
258
|
6
|
|
|
|
|
13
|
chomp($val); |
259
|
6
|
|
|
|
|
25
|
$val =~ s/\s+$//; |
260
|
6
|
|
|
|
|
19
|
$self->{email}=$val; |
261
|
6
|
|
|
|
|
23
|
$self->{'det_creds'}->{email} = $self->{email}; |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
# Preloaded methods go here. |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
1; |
266
|
|
|
|
|
|
|
__END__ |