Object/Irt/APNIC.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 43 SCAR 17.9
CC
2
Cov
0%
irt
6.0
new
2.0
address
2.0
CRAP 6.0
1 package Net::Whois::Object::Irt::APNIC;
2  
3 use strict;
4 use warnings;
5 use base qw/Net::Whois::Object/;
6  
7 # whois -t irt -h whois.afrinic.net
8 # % This is the AfriNIC Whois server.
9 #
10 # irt: [mandatory] [single] [primary/look-up key]
11 # address: [mandatory] [multiple] [ ]
12 # phone: [optional] [multiple] [ ]
13 # fax-no: [optional] [multiple] [ ]
14 # e-mail: [mandatory] [multiple] [lookup key]
15 # abuse-mailbox: [mandatory] [multiple] [inverse key]
16 # signature: [optional] [multiple] [ ]
17 # encryption: [optional] [multiple] [ ]
18 # org: [optional] [multiple] [inverse key]
19 # admin-c: [mandatory] [multiple] [inverse key]
20 # tech-c: [mandatory] [multiple] [inverse key]
21 # auth: [mandatory] [multiple] [inverse key]
22 # remarks: [optional] [multiple] [ ]
23 # irt-nfy: [optional] [multiple] [inverse key]
24 # notify: [optional] [multiple] [inverse key]
25 # mnt-by: [mandatory] [multiple] [inverse key]
26 # changed: [mandatory] [multiple] [ ]
27 # source: [mandatory] [single] [ ]
28  
29 __PACKAGE__->attributes( 'primary', [ 'irt' ] );
30 __PACKAGE__->attributes( 'mandatory', [ 'irt', 'address', 'e_mail', 'abuse_mailbox', 'admin_c', 'tech_c', 'auth', 'mnt_by', 'changed', 'source' ] );
31 __PACKAGE__->attributes( 'optional', [ 'phone', 'fax_no', 'signature', 'encryption', 'org', 'remarks', 'irt_nfy', 'notify' ] );
32 __PACKAGE__->attributes( 'single', [ 'irt', 'source' ] );
33 __PACKAGE__->attributes( 'multiple', [ 'address', 'phone', 'fax_no', 'e_mail', 'abuse_mailbox', 'signature', 'encryption', 'org', 'admin_c', 'tech_c', 'auth', 'remarks', 'irt_nfy', 'notify', 'mnt_by', 'changed' ] );
34  
35 =head1 NAME
36  
37 Net::Whois::Object::Irt::APNIC - an object representation of the RPSL Irt block
38  
39 =head1 DESCRIPTION
40  
41 The irt object is used to provide information about a Computer Security
42 Incident Response Team (CSIRT). IRTs or CSIRTs specifically respond to
43 computer security incident reports and activity.
44  
45 They are dedicated abuse handling teams, (as distinct from network operational
46 departments) which review and respond to abuse reports.
47  
48 =head1 METHODS
49  
50 =head2 B<new( %options )>
51  
52 Constructor for the Net::Whois::Object::Irt::APNIC class
53  
54 =cut
55  
56 sub new {
57 my ( $class, @options ) = @_;
58  
59 my $self = bless {}, $class;
60 $self->_init(@options);
61  
62  
63 return $self;
64  
65 }
66  
67 =head2 B<irt( [$irt] )>
68  
69 Accessor to the irt attribute.
70 Accepts an optional irt, always return the current irt.
71  
72 The irt object name starts with "IRT-".
73  
74 =cut
75  
76 sub irt {
77 my ( $self, $irt ) = @_;
78 if ( $irt and $irt !~ /^IRT-/i ) {
79 warn "Irt name not valid ($irt) : Should start with 'IRT-'";
80 }
81 return $self->_single_attribute_setget( 'irt', $irt );
82 }
83  
84 =head2 B<address( [$address] )>
85  
86 Accessor to the address attribute.
87 Accepts an optional address to be added to the address array,
88 always return the current address array.
89  
90 Full postal address of a contact.
91  
92 You can use any combination of alphanumeric characters.
93 More than one line can be used.
94  
95 =cut
96  
97 sub address {
98 my ( $self, $address ) = @_;
99  
100 return $self->_multiple_attribute_setget( 'address', $address );
101 }
102  
103 =head2 B<phone( [$phone] )>
104  
105 Accessor to the phone attribute.
106 Accepts an optional phone number to be added to the phone array,
107 always return the current phone array.
108  
109 A contact telephone number.
110  
111 + <international code> <area code> <phone #>
112  
113 + <international code> <area code> <phone #> ext. <#>
114  
115 EXAMPLE
116 phone: +681 368 0844 ext. 32
117  
118 =head2 B<fax_no( [$fax_no] )>
119  
120 Accessor to the fax_no attribute.
121 Accepts an optional fax_no to be added to the fax_no array,
122 always return the current fax_no array.
123  
124 A contact fax number.
125  
126 + <international code> <area code> <fax #>
127  
128 =head2 B<e_mail( [$e_mail] )>
129  
130 Accessor to the e_mail attribute.
131 Accepts an optional e_mail to be added to the e_mail array,
132 always return the current e_mail array.
133  
134 A contact email address for non-abuse/technical incidents.
135  
136 =head2 B<abuse_mailbox( [$abuse_mailbox] )>
137  
138 Accessor to the abuse_mailbox attribute.
139 Accepts an optional abuse_mailbox to be added to the abuse_mailbox array,
140 always return the current abuse_mailbox array.
141  
142 Specifies the email address to which abuse complaints should be sent.
143  
144 =head2 B<signature( [$signature] )>
145  
146 Accessor to the signature attribute.
147 Accepts an optional signature to be added to the signature array,
148 always return the current signature array.
149  
150 References a KeyCert object representing a CSIRT public key used by the
151 team to sign their correspondence.
152  
153 =head2 B<encryption( [$encryption] )>
154  
155 Accessor to the encryption attribute.
156 Accepts an optional encryption to be added to the encryption array,
157 always return the current encryption array.
158  
159 References a KeyCert object representing a CSIRT public key used to encrypt
160 correspondence sent to the CSIRT.
161  
162 =head2 B<org( [$org] )>
163  
164 Accessor to the org attribute.
165 Accepts an optional org value to be added to the org array,
166 always return the current org array.
167  
168 The organisation responsible for this resource.
169  
170 =head2 B<auth( [$auth] )>
171  
172 Accessor to the auth attribute.
173 Accepts an optional auth to be added to the auth array,
174 always return the current auth array.
175  
176 The Auth defines an authentication scheme to be used. Any of the current
177 authentication schemes used by the RIPE Database are allowed.
178  
179 =head2 B<admin_c( [$contact] )>
180  
181 Accessor to the admin_c attribute.
182 Accepts an optional contact to be added to the admin_c array,
183 always return the current admin_c array.
184  
185 The NIC-handle of an on-site administrative contact. As more than one person
186 often fulfills a role function, there may be more than one admin_c listed.
187  
188 An administrative contact (admin_c) must be someone who is physically
189 located at the site of the network.
190  
191 =head2 B<tech_c( [$contact] )>
192  
193 Accessor to the tech_c attribute.
194 Accepts an optional contact to be added to the tech_c array,
195 always return the current tech_c array.
196  
197 The NIC-handle of a technical contact. As more than one person often fulfills
198 a role function, there may be more than one tech_c listed.
199  
200 A technical contact (tech_c) must be a person responsible for the
201 day-to-day operation of the network, but does not need to be
202 physically located at the site of the network.
203  
204 =head2 B<remarks( [$remark] )>
205  
206 Accessor to the remarks attribute.
207 Accepts an optional remark to be added to the remarks array,
208 always return the current remarks array.
209  
210 Information about the object that cannot be stated in other attributes.
211  
212 =head2 B<notify( [$notify] )>
213  
214 Accessor to the notify attribute.
215 Accepts an optional notify value to be added to the notify array,
216 always return the current notify array.
217  
218 The email address to which notifications of changes to this object should
219 be sent.
220  
221 =head2 B<mnt_by( [$mnt_by] )>
222  
223 Accessor to the mnt_by attribute.
224 Accepts an optional mnt_by value to be added to the mnt_by array,
225 always return the current mnt_by array.
226  
227 Lists a registered Mntner used to authorize and authenticate changes to
228 this object.
229  
230 =head2 B<changed( [$changed] )>
231  
232 Accessor to the changed attribute.
233 Accepts an optional changed value to be added to the changed array,
234 always return the current changed array.
235  
236 The email address of who last updated the database object and the date it
237 occurred.
238  
239 Every time a change is made to a database object, this attribute will show
240 the email address of the person who made those changes.
241 Please use the address format specified in RFC 822 - Standard for
242 the Format of ARPA Internet Text Message and provide the date
243 format using one of the following two formats: YYYYMMDD or YYMMDD.
244  
245 =head2 B<source( [$source] )>
246  
247 Accessor to the source attribute.
248 Accepts an optional source, always return the current source.
249  
250 The database where the object is registered.
251  
252 =head2 B<irt_nfy( [$irt_nfy] )>
253  
254 Accessor to the irt_nfy attribute.
255 Accepts an optional irt_nfy value to be added to the irt_nfy array,
256 always return the current irt_nfy array.
257  
258 The irt_nfy attribute specifies the email address to be notified when a
259 reference to the irt object is added or removed.
260  
261 =cut
262  
263 1;