Object/AsSet/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::AsSet::APNIC;
2  
3 use strict;
4 use warnings;
5 use base qw/Net::Whois::Object/;
6  
7 # whois -h whois.apnic.net -t as-set
8 # % [whois.apnic.net]
9 # % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
10 #
11 # as-set: [mandatory] [single] [primary/lookup key]
12 # descr: [mandatory] [multiple] [ ]
13 # country: [optional] [single] [ ]
14 # members: [optional] [multiple] [ ]
15 # mbrs-by-ref: [optional] [multiple] [inverse key]
16 # remarks: [optional] [multiple] [ ]
17 # org: [optional] [multiple] [inverse key]
18 # tech-c: [mandatory] [multiple] [inverse key]
19 # admin-c: [mandatory] [multiple] [inverse key]
20 # notify: [optional] [multiple] [inverse key]
21 # mnt-by: [mandatory] [multiple] [inverse key]
22 # mnt-lower: [optional] [multiple] [inverse key]
23 # changed: [mandatory] [multiple] [ ]
24 # source: [mandatory] [single] [ ]
25 #
26 # % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS2)
27  
28 __PACKAGE__->attributes( 'primary', ['as_set'] );
29 __PACKAGE__->attributes( 'mandatory', [ 'as_set', 'descr', 'tech_c', 'admin_c', 'mnt_by', 'changed', 'source' ] );
30 __PACKAGE__->attributes( 'optional', [ 'country', 'members', 'mbrs_by_ref', 'remarks', 'org', 'notify', 'mnt_lower' ] );
31 __PACKAGE__->attributes( 'single', [ 'as_set', 'country', 'source' ] );
32 __PACKAGE__->attributes( 'multiple', [ 'descr', 'members', 'mbrs_by_ref', 'remarks', 'org', 'tech_c', 'admin_c', 'notify', 'mnt_by', 'mnt_lower', 'changed' ] );
33  
34 =head1 NAME
35  
36 Net::Whois::Object::AsSet::APNIC - an object representation of a RPSL AsSet block
37  
38 =head1 DESCRIPTION
39  
40 An as-set object defines a set of aut-num objects.
41 It defines a group of Autonomous Systems with the same routing policies.
42  
43 =head1 METHODS
44  
45 =head2 new ( @options )
46  
47 Constructor for the Net::Whois::Object::AsSet::APNIC class
48  
49 =cut
50  
51 sub new {
52 my ( $class, @options ) = @_;
53  
54 my $self = bless {}, $class;
55 $self->_init(@options);
56  
57 return $self;
58 }
59  
60 =head2 B<as_set( [$as_set])>
61  
62 Accessor to the as_set attribute.
63 Accepts an optional as_set, always return the current as_set value.
64  
65 The as_set attribute defines the name of the set. It is an RPSL name that
66 starts with "as-" or as_set names and AS numbers separated by colon (':').
67 The later form is called Hierarchical form, the former non-hierarchical.
68 There must be at least one set-name within the hierarchical form that starts
69 with 'as-'.
70  
71  
72 =head2 B<descr( [$descr] )>
73  
74 Accessor to the descr attribute.
75 Accepts an optional descr to be added to the descr array,
76 always return the current descr array.
77  
78 A short description related to the object's purpose.
79  
80 =head2 B<members( [$member] )>
81  
82 Accessor to the members attribute.
83 Accepts an optional member to be added to the members array,
84 always return the current 'members' array.
85  
86 The members attribute lists the members of the set. It can be either a list
87 of AS Numbers, or other as-set names.
88  
89 =head2 B<mbrs_by_ref( [$mbr] )>
90  
91 Accessor to the mbrs_by_ref attribute.
92 Accepts an optional mbr to be added to the mbrs_by_ref array,
93 always return the current mbrs_by_ref array.
94  
95 The identifier of a registered 'mntner' object that can be used to add members
96 to the as-set indirectly.
97  
98 The mbrs_by_ref attribute can be used in all "set" objects; it allows
99 indirect population of a set. If this attribute is used, the set also includes
100 objects of the corresponding type (aut-num objects for as-set, for example)
101 that are protected by one of these maintainers and whose "member-of:"
102 attributes refer to the name of the set. If the value of a mbrs_by_ref
103 attribute is ANY, any object of the corresponding type referring to the set is
104 a member of the set. If the mbrs_by_ref attribute is missing, the set is
105 defined explicitly by the members attribute.
106  
107 =head2 B<remarks( [$remark] )>
108  
109 Accessor to the remarks attribute.
110 Accepts an optional remark to be added to the remarks array,
111 always return the current remarks array.
112  
113 Information about the object that cannot be stated in other attributes.
114 May include a URL or email address.
115  
116 =head2 B<org( [$org] )>
117  
118 Accessor to the org attribute.
119 Accepts an optional org, always return the current org.
120  
121 Points to an existing organisation object representing the entity that
122 holds the resource.
123  
124 The 'ORG-' string followed by 2 to 4 characters, followed by up to 5 digits
125 followed by a source specification. The first digit must not be "0".
126 Source specification starts with "-" followed by source name up to
127 9-character length.
128  
129 =head2 B<tech_c( [$tech_c] )>
130  
131 Accessor to the tech_c attribute.
132 Accepts an optional tech_c to be added to the tech_c array,
133 always return the current tech_c array.
134  
135 The NIC-handle of a technical contact 'person' or 'role' object. As more than
136 one person often fulfills a role function, there may be more than one tech-c
137 listed.
138  
139 A technical contact (tech-c) must be a person responsible for the
140 day-to-day operation of the network, but does not need to be
141 physically located at the site of the network.
142  
143 =head2 B<admin_c( [$admin_c] )>
144  
145 Accessor to the admin_c attribute.
146 Accepts an optional admin_c to be added to the admin_c array,
147 always return the current admin_c array.
148  
149 The NIC-handle of an on-site contact 'person' object. As more than one person
150 often fulfills a role function, there may be more than one admin-c listed.
151  
152 An administrative contact (admin-c) must be someone who is physically
153 located at the site of the network.
154  
155 =head2 B<notify( [$notify] )>
156  
157 Accessor to the notify attribute.
158 Accepts an optional notify value to be added to the notify array,
159 always return the current notify array.
160  
161 The email address to which notifications of changes to this object will be
162 sent.
163  
164 =head2 B<mnt_by( [$mnt] )>
165  
166 Accessor to the mnt_by attribute.
167 Accepts an optional mnt to be added to the mnt_by array,
168 always return the current mnt_by array.
169  
170 Lists a registered 'mntner' used to authorize and authenticate changes to this
171 object.
172  
173 When your database details are protected by a 'mntner' object, then
174 only persons with access to the security information of that 'mntner'
175 object will be able to change details.
176  
177 =head2 B<mnt_lower( [$mnt] )>
178  
179 Accessor to the mnt_lower attribute.
180 Accepts an optional mnt to be added to the mnt_lower array,
181 always return the current mnt_lower array.
182  
183 Specifies the identifier of a registered mntner object used
184 for hierarchical authorisation. Protects creation of objects
185 directly (one level) below in the hierarchy of an object type.
186 The authentication method of this maintainer object will then
187 be used upon creation of any object directly below the object
188 that contains the "mnt-lower:" attribute.
189  
190 =head2 B<changed( [$changed] )>
191  
192 Accessor to the changed attribute.
193 Accepts an optional changed value to be added to the changed array,
194 always return the current changed array.
195  
196 The email address of who last updated the database object and the date it
197 occurred.
198  
199 Every time a change is made to a database object, this attribute will show
200 the email address of the person who made those changes.
201 Please use the address format specified in RFC 822 - Standard for
202 the Format of ARPA Internet Text Message and provide the date
203 format using one of the following two formats: YYYYMMDD or YYMMDD.
204  
205 =head2 B<source( [$source] )>
206  
207 Accessor to the source attribute.
208 Accepts an optional source, always return the current source.
209  
210 The database where the object is registered.
211  
212 =cut
213  
214 1;