Object/Inet6Num/APNIC.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 28 SCAR 6.9
CC
1
Cov
0%
new
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::Whois::Object::Inet6Num::APNIC;
2  
3 use strict;
4 use warnings;
5 use base qw/Net::Whois::Object/;
6  
7 # whois -h whois.apnic.net -t inet6num
8 # % [whois.apnic.net]
9 # % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
10 #
11 # inet6num: [mandatory] [single] [primary/lookup key]
12 # netname: [mandatory] [single] [lookup key]
13 # descr: [mandatory] [multiple] [ ]
14 # country: [mandatory] [multiple] [ ]
15 # geoloc: [optional] [single] [ ]
16 # language: [optional] [multiple] [ ]
17 # org: [optional] [single] [inverse key]
18 # admin-c: [mandatory] [multiple] [inverse key]
19 # tech-c: [mandatory] [multiple] [inverse key]
20 # status: [mandatory] [single] [ ]
21 # remarks: [optional] [multiple] [ ]
22 # notify: [optional] [multiple] [inverse key]
23 # mnt-by: [mandatory] [multiple] [inverse key]
24 # mnt-lower: [optional] [multiple] [inverse key]
25 # mnt-routes: [optional] [multiple] [inverse key]
26 # mnt-irt: [mandatory] [multiple] [inverse key]
27 # changed: [mandatory] [multiple] [ ]
28 # source: [mandatory] [single] [ ]
29  
30  
31 __PACKAGE__->attributes( 'primary', [ 'inet6num'] );
32 __PACKAGE__->attributes( 'mandatory', [ 'inet6num', 'netname', 'descr', 'country', 'admin_c', 'tech_c', 'status', 'mnt_by', 'mnt_irt', 'changed', 'source' ] );
33 __PACKAGE__->attributes( 'optional', [ 'geoloc', 'language', 'org', 'remarks', 'notify', 'mnt_lower', 'mnt_routes' ] );
34 __PACKAGE__->attributes( 'single', [ 'inet6num', 'netname', 'geoloc', 'org', 'status', 'source' ] );
35 __PACKAGE__->attributes( 'multiple', [ 'descr', 'country', 'language', 'admin_c', 'tech_c', 'remarks', 'notify', 'mnt_by', 'mnt_lower', 'mnt_routes', 'mnt_irt', 'changed' ] );
36  
37 =head1 NAME
38  
39 Net::Whois::Object::Inet6Num::APNIC - an object representation of a RPSL Inet6Num block
40  
41 =head1 DESCRIPTION
42  
43 An inet6num object contains information on allocations and assignments
44 of IPv6 address space.
45  
46 =head1 METHODS
47  
48 =head2 new ( @options )
49  
50 Constructor for the Net::Whois::Object::Inet6Num::APNIC class
51  
52 =cut
53  
54 sub new {
55 my ( $class, @options ) = @_;
56  
57 my $self = bless {}, $class;
58 $self->_init(@options);
59  
60 return $self;
61 }
62  
63 =head2 B<inet6num( [$inet6num] )>
64  
65 Accessor to the inet6num attribute.
66 Accepts an optional inet6num value, always return the current inet6num value.
67  
68 The inet6num attribute specifies a range of IPv6 addresses that the
69 inet6num object presents. The range may be a single address.
70  
71 Addresses can only be expressed in prefix notation
72  
73 =head2 B<netname( [$netname] )>
74  
75 Accessor to the netname attribute.
76 Accepts an optional netname, always return the current netname.
77  
78 The netname attribute is the name of a range of IP address space. It is
79 recommended that the same netname is used for any set of assignment ranges
80 used for a common purpose.
81  
82 =head2 B<descr( [$descr] )>
83  
84 Accessor to the descr attribute.
85 Accepts an optional descr to be added to the descr array,
86 always return the current descr array.
87  
88 Description of the organization allocated or assigned the address space shown
89 in the inet6num.
90  
91 =head2 B<country( [$country] )>
92  
93 Accessor to the country attribute.
94 Accepts an optional country to be added to the country array,
95 always return the current country array.
96  
97 The country attribute identifies the country. It has never been specified
98 if this is the country where the addresses are used, where the issuing
99 organisation is based or some transit country in between. There are no rules
100 defined for this attribute. It cannot therefore be used in any reliable way to
101 map IP addresses to countries.
102  
103 =head2 B<geoloc( [$geoloc] )>
104  
105 Accessor to the geoloc attribute.
106 Accepts an optional geoloc, always return the current geoloc.
107  
108 The location coordinates for the resource
109  
110 Location coordinates of the resource. Can take one of the following forms:
111 [-90,90][-180,180]
112  
113 =head2 B<language( [$language] )>
114  
115 Accessor to the language attribute.
116 Accepts an optional language to be added to the language array,
117 always return the current language array.
118  
119 Identifies the language.
120  
121 Valid two-letter ISO 639-1 language code.
122  
123 =head2 B<org( [$org] )>
124  
125 Accessor to the org attribute.
126 Accepts an optional org, always return the current org.
127  
128 Only a single value for the org attribute is allowed in the inet6num
129 object. This is to ensure only one organisation is responsible for this
130 resource.
131  
132 =head2 B<admin_c( [$contact] )>
133  
134 Accessor to the admin_c attribute.
135 Accepts an optional contact to be added to the admin_c array,
136 always return the current admin_c array.
137  
138 The NIC-handle of an on-site contact 'person' object. As more than one person
139 often fulfills a role function, there may be more than one admin_c listed.
140  
141 An administrative contact (admin_c) must be someone who is physically
142 located at the site of the network.
143  
144 =head2 B<tech_c( [$contact] )>
145  
146 Accessor to the tech_c attribute.
147 Accepts an optional contact to be added to the tech_c array,
148 always return the current tech_c array.
149  
150 The NIC-handle of a technical contact 'person' or 'role' object. As more than
151 one person often fulfills a role function, there may be more than one tech_c
152 listed.
153  
154 A technical contact (tech_c) must be a person responsible for the
155 day-to-day operation of the network, but does not need to be
156  
157 =head2 B<status( [$status] )>
158  
159 Accessor to the status attribute.
160 Accepts an optional status, always return the current status.
161  
162 The status attribute indicates where the address range represented by an
163 inet6num object sits in a hierarchy and how it is used.
164  
165 Status can have one of these values:
166  
167 =over 4
168  
169 =item ALLOCATED-BY-RIR
170  
171 =item ALLOCATED-BY-LIR
172  
173 =item ASSIGNED
174  
175 =item ASSIGNED ANYCAST
176  
177 =item ASSIGNED PI
178  
179 =back
180  
181 =head2 B<remarks( [$remark] )>
182  
183 Accessor to the remarks attribute.
184 Accepts an optional remark to be added to the remarks array,
185 always return the current remarks array.
186  
187 General remarks. May include a URL or instructions on where to send abuse
188 complaints.
189  
190 =head2 B<notify( [$notify] )>
191  
192 Accessor to the notify attribute.
193 Accepts an optional notify value to be added to the notify array,
194 always return the current notify array.
195  
196 The email address to which notifications of changes to this object should be
197 sent.
198  
199 =head2 B<mnt_by( [$mnt_by] )>
200  
201 Accessor to the mnt_by attribute.
202 Accepts an optional mnt_by value to be added to the mnt_by array,
203 always return the current mnt_by array.
204  
205 =head2 B<mnt_lower( [$mnt_lower] )>
206  
207 Accessor to the mnt_lower attribute.
208 Accepts an optional mnt_lower value to be added to the mnt_lower array,
209 always return the current mnt_lower array.
210  
211 Sometimes there is a hierarchy of maintainers. In these cases, mnt-lower is
212 used as well as 'mnt-by.'
213  
214 =head2 B<mnt_routes( [$mnt_route] )>
215  
216 Accessor to the mnt_routes attribute.
217 Accepts an optional mnt_route to be added to the mnt_routes array,
218 always return the current mnt_routes array.
219  
220 The identifier of a registered Mntner object used to control the creation of
221 Route6 objects associated with the address range specified by the Inet6num
222 object.
223  
224 =head2 B<mnt_domains( [$mnt_route] )>
225  
226 Accessor to the mnt_domains attribute.
227 Accepts an optional mnt_route to be added to the mnt_domains array,
228 always return the current mnt_domains array.
229  
230 The identifier of a registered Mntner object used to control the creation of
231 Domain objects associated with the address range specified by the Inet6num
232 object.
233  
234 =head2 B<mnt_irt( [$mnt_irt] )>
235  
236 Accessor to the mnt_irt attribute.
237 Accepts an optional mnt_irt to be added to the mnt_irt array,
238 always return the current mnt_irt array.
239  
240 mnt_irt references an Irt object. Authorisation is required from the Irt
241 object to be able to add this reference.
242  
243 =head2 B<changed( [$changed] )>
244  
245 Accessor to the changed attribute.
246 Accepts an optional changed value to be added to the changed array,
247 always return the current changed array.
248  
249 The email address of who last updated the database object and the date it
250 occurred.
251  
252 Every time a change is made to a database object, this attribute will show
253 the email address of the person who made those changes.
254 Please use the address format specified in RFC 822 - Standard for
255 the Format of ARPA Internet Text Message and provide the date
256 format using one of the following two formats: YYYYMMDD or YYMMDD.
257  
258 =head2 B<source( [$source] )>
259  
260 Accessor to the source attribute.
261 Accepts an optional source, always return the current source.
262  
263 The database where the object is registered.
264  
265 =cut
266  
267 1;