line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Whois::ARIN::Contact; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Net::Whois::ARIN::Contact - ARIN whois Contact record class |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Net::Whois::ARIN::Contact; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $poc = Net::Whois::ARIN::Contact->new( |
12
|
|
|
|
|
|
|
Name => 'Caine, Todd', |
13
|
|
|
|
|
|
|
Handle => 'TCA53-ARIN', |
14
|
|
|
|
|
|
|
Company => 'Electric Lightwave', |
15
|
|
|
|
|
|
|
Address => '4400 NE 77th Ave', |
16
|
|
|
|
|
|
|
City => 'Vancouver', |
17
|
|
|
|
|
|
|
StateProv => 'WA', |
18
|
|
|
|
|
|
|
PostalCode => '98662', |
19
|
|
|
|
|
|
|
Country => 'US', |
20
|
|
|
|
|
|
|
Comment => '', |
21
|
|
|
|
|
|
|
RegDate => '1995-07-25', |
22
|
|
|
|
|
|
|
Updated => '2001-05-17', |
23
|
|
|
|
|
|
|
Phone => '503-555-1212', |
24
|
|
|
|
|
|
|
Email => 'nobody@nobody.net', |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
printf "The ARIN contact handle for %s is %s.\n", |
28
|
|
|
|
|
|
|
$poc->Name, |
29
|
|
|
|
|
|
|
$poc->Handle; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 DESCRIPTION |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
The Net::Whois::ARIN::Contact module is simple class which is used to store the attributes of a point-of-contact record in ARIN's Whois server. Each attribute of the contact record has an accessor/mutator of the same name. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
6
|
|
|
6
|
|
35
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
200
|
|
38
|
6
|
|
|
6
|
|
31
|
use Carp "croak"; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
3123
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
our $AUTOLOAD; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=over 4 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item B - create a Net::Whois::ARIN::Contact object |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub new { |
51
|
7
|
|
|
7
|
1
|
16
|
my $class = shift; |
52
|
7
|
|
|
|
|
133
|
return bless { @_ }, $class; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item B - return the current whois record |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
print $o->dump; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=back |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub dump { |
64
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
65
|
0
|
|
|
|
|
0
|
my $record = sprintf "\nName: %s\n",$self->Name; |
66
|
0
|
|
|
|
|
0
|
$record .= sprintf "Handle: %s\n",$self->Handle; |
67
|
0
|
|
|
|
|
0
|
$record .= sprintf "Company: %s\n",$self->Company; |
68
|
0
|
|
|
|
|
0
|
$record .= sprintf("Address: %s\n", $_) for @{ $self->Address }; |
|
0
|
|
|
|
|
0
|
|
69
|
0
|
|
|
|
|
0
|
$record .= sprintf "City: %s\n",$self->City; |
70
|
0
|
|
|
|
|
0
|
$record .= sprintf "StateProv: %s\n",$self->StateProv; |
71
|
0
|
|
|
|
|
0
|
$record .= sprintf "PostalCode: %s\n",$self->PostalCode; |
72
|
0
|
|
|
|
|
0
|
$record .= sprintf "Country: %s\n",$self->Country; |
73
|
0
|
|
|
|
|
0
|
$record .= sprintf "Comment: %s\n",$self->Comment; |
74
|
0
|
|
|
|
|
0
|
$record .= sprintf "RegDate: %s\n",$self->RegDate; |
75
|
0
|
|
|
|
|
0
|
$record .= sprintf "Updated: %s\n",$self->Updated; |
76
|
0
|
|
|
|
|
0
|
$record .= sprintf "Phone: %s\n",$self->Phone; |
77
|
0
|
|
|
|
|
0
|
$record .= sprintf "Email: %s\n",$self->Email; |
78
|
0
|
|
|
|
|
0
|
return $record; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub Type { |
82
|
12
|
|
|
12
|
1
|
991
|
my $self = shift; |
83
|
12
|
100
|
|
|
|
67
|
$self->{Type} = shift if @_; |
84
|
12
|
|
|
|
|
57
|
return $self->{Type}; |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
These methods are the accessors/mutators for the fields found in the Whois record. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=over 4 |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item B - get/set the contact type |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item B - get/set the contact name |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item B - get/set the contact handle |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item B - get/set the company |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item B - get/set the address |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item B - get/set the city |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item B - get/set the state or province |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item B - get/set the postal code |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item B - get/set the country |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item B - get/set the registration date |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item B - get/set the last updated date |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item B - get/set the contact phone number |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item B - get/set the contact email address |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item B - get/set the public comment |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=back |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=cut |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
sub AUTOLOAD { |
126
|
13
|
|
|
13
|
|
933
|
my $self = shift; |
127
|
13
|
|
|
|
|
18
|
my $name = $AUTOLOAD; |
128
|
13
|
|
|
|
|
53
|
$name =~ s/.*://; |
129
|
|
|
|
|
|
|
|
130
|
13
|
50
|
|
|
|
34
|
return if $name eq 'DESTROY'; |
131
|
|
|
|
|
|
|
|
132
|
13
|
50
|
33
|
|
|
91
|
if ($name !~ /^_/ && exists $self->{$name}) { |
133
|
13
|
50
|
|
|
|
26
|
if (@_) { |
134
|
0
|
|
|
|
|
0
|
return $self->{$name} = shift; |
135
|
|
|
|
|
|
|
} else { |
136
|
13
|
|
|
|
|
62
|
return $self->{$name}; |
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
0
|
|
|
|
|
|
croak "Undefined subroutine \&$AUTOLOAD called"; |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head1 AUTHOR |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Todd Caine |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Copyright (c) 2004-2011 Todd Caine. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=cut |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
1; |
154
|
|
|
|
|
|
|
__END__ |