Object/FilterSet/APNIC.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 41 CC 2 SCAR 12.0
CC
2
Cov
0%
filter_set
6.0
new
2.0
BEGIN
2.0
CRAP 3.3
1 package Net::Whois::Object::FilterSet::APNIC;
2  
3 use strict;
4 use warnings;
5 use base qw/Net::Whois::Object/;
6  
7 # whois -h whois.apnic.net -t filter-set
8 # % [whois.apnic.net]
9 # % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
10 #
11 # filter-set: [mandatory] [single] [primary/lookup key]
12 # descr: [mandatory] [multiple] [ ]
13 # filter: [optional] [single] [ ]
14 # mp-filter: [optional] [single] [ ]
15 # remarks: [optional] [multiple] [ ]
16 # org: [optional] [multiple] [inverse key]
17 # tech-c: [mandatory] [multiple] [inverse key]
18 # admin-c: [mandatory] [multiple] [inverse key]
19 # notify: [optional] [multiple] [inverse key]
20 # mnt-by: [mandatory] [multiple] [inverse key]
21 # mnt-lower: [optional] [multiple] [inverse key]
22 # changed: [mandatory] [multiple] [ ]
23 # source: [mandatory] [single] [ ]
24 #
25 # % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS2)
26  
27 __PACKAGE__->attributes( 'primary', [ 'filter_set' ] );
28 __PACKAGE__->attributes( 'mandatory', [ 'filter_set', 'descr', 'tech_c', 'admin_c', 'mnt_by', 'changed', 'source' ] );
29 __PACKAGE__->attributes( 'optional', [ 'filter', 'mp_filter', 'remarks', 'org', 'notify', 'mnt_lower' ] );
30 __PACKAGE__->attributes( 'single', [ 'filter_set', 'filter', 'mp_filter', 'source' ] );
31 __PACKAGE__->attributes( 'multiple', [ 'descr', 'remarks', 'org', 'tech_c', 'admin_c', 'notify', 'mnt_by', 'mnt_lower', 'changed' ] );
32  
33 =head1 NAME
34  
35 Net::Whois::Object::FilterSet::APNIC - an object representation of a RPSL FilterSet block
36  
37 =head1 DESCRIPTION
38  
39 A FilterSet object defines a set of routes that match the criteria that you
40 specify in your 'filter', in other words it filters out routes that you do
41 not want to see.
42  
43 =head1 METHODS
44  
45 =head2 new ( @options )
46  
47 Constructor for the Net::Whois::Object::FilterSet::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<filter_set( [$filter_set] )>
61  
62 Accessor to the filter_set attribute.
63 Accepts an optional filter_set value, always return the current filter_set value.
64  
65 The filter_set attribute defines the name of the filter. It is an RPSL
66 name that starts with "fltr-".
67  
68 The name of a filter_set object can be hierarchical:
69  
70 A hierarchical filter_set name is a sequence of filter_set names and AS
71 Numbers separated by colons. At least one component of the name must be an
72 actual filter_set name (i.e. start with "fltr-"). All the set name
73 components of a hierarchical filter-name have to be filter_set names.
74  
75 =cut
76  
77 sub filter_set {
78 my ( $self, $filter_set ) = @_;
79 if ( $filter_set and $filter_set !~ /^fltr-/i ) {
80 warn "Incorrect FilterSet's name ($filter_set) : Should start with 'FLTR-'";
81 }
82  
83 return $self->_single_attribute_setget( 'filter_set', $filter_set );
84 }
85  
86 =head2 B<descr( [$descr] )>
87  
88 Accessor to the descr attribute.
89 Accepts an optional descr value to be added to the descr array,
90 always return the current descr array.
91  
92 A short description related to the object's purpose.
93  
94 =head2 B<filter( [$filter] )>
95  
96 Accessor to the filter attribute.
97 Accepts an optional filter value, always return the current filter.
98  
99 The filter attribute defines the policy filter of the set.
100  
101 A policy filter is a logical expression which, when applied to a
102 set of routes, returns a subset of these routes, the ones that
103 you have said you want to see.
104  
105 =head2 B<mp_filter( [$mp_filter] )>
106  
107 Accessor to the mp_filter attribute.
108 Accepts an optional mp_filter value, always return the current mp_filter.
109  
110 Logical expression which when applied to a set of IPv4 or IPv6 routes returns
111 a subset of these routes.
112  
113 =head2 B<remarks( [$remark] )>
114  
115 Accessor to the remarks attribute.
116 Accepts an optional remark to be added to the remarks array,
117 always return the current remarks array.
118  
119 General remarks. May include a URL or email address.
120  
121 =head2 B<tech_c( [$contact] )>
122  
123 Accessor to the tech_c attribute.
124 Accepts an optional contact to be added to the tech_c array,
125 always return the current tech_c array.
126  
127 The NIC-handle of a technical contact 'person' or 'role' object. As more than
128 one person often fulfills a role function, there may be more than one tech_c
129 listed.
130  
131 A technical contact (tech_c) must be a person responsible for the
132 day-to-day operation of the network, but does not need to be
133 physically located at the site of the network.
134  
135 =head2 B<admin_c( [$contact] )>
136  
137 Accessor to the admin_c attribute.
138 Accepts an optional contact to be added to the admin_c array,
139 always return the current admin_c array.
140  
141 The NIC-handle of an on-site contact 'person' object. As more than one person
142 often fulfills a role function, there may be more than one admin_c listed.
143  
144 An administrative contact (admin_c) must be someone who is physically
145 located at the site of the network.
146  
147 =head2 B<org( [$org] )>
148  
149 Accessor to the org attribute.
150 Accepts an optional org value to be added to the org array,
151 always return the current org array.
152  
153 The organisation responsible for this FilterSet object.
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 of who last updated the database object and the date it
162 occurred.
163  
164 Every time a change is made to a database object, this attribute will show
165 the email address of the person who made those changes.
166 Please use the address format specified in RFC 822 - Standard for
167 the Format of ARPA Internet Text Message and provide the date
168 format using one of the following two formats: YYYYMMDD or YYMMDD.
169  
170 =head2 B<mnt_by( [$mnt_by] )>
171  
172 Accessor to the mnt_by attribute.
173 Accepts an optional mnt_by value to be added to the mnt_by array,
174 always return the current mnt_by array.
175  
176 Lists a registered 'mntner' used to authorize and authenticate changes to this
177 object.
178  
179 When the database details are protected by a Mntner object, then
180 only persons with access to the security information of that Mntner
181 object will be able to change details.
182  
183 =head2 B<mnt_lower( [$mnt_lower] )>
184  
185 Accessor to the mnt_lower attribute.
186 Accepts an optional mnt_lower value to be added to the mnt_lower array,
187 always return the current mnt_lower array.
188  
189 Sometimes there is a hierarchy of maintainers. In these cases, mnt_lower is
190 used as well as mnt_by.
191  
192 =head2 B<changed( [$changed] )>
193  
194 Accessor to the changed attribute.
195 Accepts an optional changed value to be added to the changed array,
196 always return the current changed array.
197  
198 The email address of who last updated the database object and the date it
199 occurred.
200  
201 Every time a change is made to a database object, this attribute will show
202 the email address of the person who made those changes.
203 Please use the address format specified in RFC 822 - Standard for
204 the Format of ARPA Internet Text Message and provide the date
205 format using one of the following two formats: YYYYMMDD or YYMMDD.
206  
207 =head2 B<source( [$source] )>
208  
209 Accessor to the source attribute.
210 Accepts an optional source, always return the current source.
211  
212 The database where the object is registered.
213  
214 =cut
215  
216 1;