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