File Coverage

blib/lib/Net/Whois/Object/FilterSet.pm
Criterion Covered Total %
statement 16 17 94.1
branch 1 2 50.0
condition 2 3 66.6
subroutine 5 5 100.0
pod 2 2 100.0
total 26 29 89.6


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