Object/RtrSet/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::RtrSet::AFRINIC;
2  
3 use strict;
4 use warnings;
5 use base qw/Net::Whois::Object/;
6  
7 # whois -t rtr-set -h whois.afrinic.net
8 # % This is the AfriNIC Whois server.
9 #
10 # rtr-set: [mandatory] [single] [primary/look-up key]
11 # descr: [mandatory] [multiple] [ ]
12 # members: [optional] [multiple] [ ]
13 # mp-members: [optional] [multiple] [ ]
14 # mbrs-by-ref: [optional] [multiple] [inverse key]
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 __PACKAGE__->attributes( 'primary', ['rtr_set'] );
26 __PACKAGE__->attributes( 'mandatory', [ 'rtr_set', 'descr', 'tech_c', 'admin_c', 'mnt_by', 'changed', 'source' ] );
27 __PACKAGE__->attributes( 'optional', [ 'members', 'mp_members', 'mbrs_by_ref', 'remarks', 'org', 'notify', 'mnt_lower' ] );
28 __PACKAGE__->attributes( 'single', [ 'rtr_set', 'source' ] );
29 __PACKAGE__->attributes( 'multiple', [ 'descr', 'members', 'mp_members', 'mbrs_by_ref', 'remarks', 'org', 'tech_c', 'admin_c', 'notify', 'mnt_by', 'mnt_lower', 'changed' ] );
30  
31 =head1 NAME
32  
33 Net::Whois::Object::RtrSet::AFRINIC - an object representation of the RPSL RtrSet block
34  
35 =head1 DESCRIPTION
36  
37 A rtr-set object defines a set of routers. A set may be described by
38 the "members:" attribute, which is a list of inet-rtr names, IPv4
39 addresses or other rtr-set names. A set may also be populated by means
40 of the "mbrs-by-ref:" attribute, in which case it is represented by
41 inet-rtr objects.
42  
43 =head1 METHODS
44  
45 =head2 B<new( %options )>
46  
47 Constructor for the Net::Whois::Object::RtrSet::AFRINIC 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<rtr_set( [$rtr_set] )>
61  
62 Accessor to the rtr_set attribute.
63 Accepts an optional rtr_set, always return the current rtr_set.
64  
65 =head2 B<descr( [$descr] )>
66  
67 Accessor to the descr attribute.
68 Accepts an optional descr line to be added to the descr array,
69 always return the current descr array.
70  
71 =head2 B<members( [$member] )>
72  
73 Accessor to the members attribute.
74 Accepts an optional member to be added to the members array,
75 always return the current members array.
76  
77 =head2 B<mbrs_by_ref( [$mbrs_by_ref] )>
78  
79 Accessor to the mbrs_by_ref attribute.
80 Accepts an optional mbrs_by_ref value to be added to the mbrs_by_ref array,
81 always return the current mbrs_by_ref array.
82  
83 =head2 B<remarks( [$remark] )>
84  
85 Accessor to the remarks attribute.
86 Accepts an optional remark to be added to the remarks array,
87 always return the current remarks array.
88  
89 =head2 B<org( [$org] )>
90  
91 Accessor to the org attribute.
92 Accepts an optional org, always return the current org.
93  
94 Points to an existing organisation object representing the entity that
95 holds the resource.
96  
97 The 'ORG-' string followed by 2 to 4 characters, followed by up to 5 digits
98 followed by a source specification. The first digit must not be "0".
99 Source specification starts with "-" followed by source name up to
100 9-character length.
101  
102 =head2 B<tech_c( [$contact] )>
103  
104 Accessor to the tech_c attribute.
105 Accepts an optional contact to be added to the tech_c array,
106 always return the current tech_c array.
107  
108 =head2 B<admin_c( [$contact] )>
109  
110 Accessor to the admin_c attribute.
111 Accepts an optional contact to be added to the admin_c array,
112 always return the current admin_c array.
113  
114 =head2 B<notify( [$notify] )>
115  
116 Accessor to the notify attribute.
117 Accepts an optional notify value to be added to the notify array,
118 always return the current notify array.
119  
120 =head2 B<mnt_by( [$mnt_by])>
121  
122 Accessor to the mnt_by attribute.
123 Accepts an optional mnt_by value to be added to the mnt_by array,
124 always return the current mnt_by array.
125  
126 =head2 B<changed( [$changed] )>
127  
128 Accessor to the changed attribute.
129 Accepts an optional changed value to be added to the changed array,
130 always return the current changed array.
131  
132 =head2 B<source( [$source] )>
133  
134 Accessor to the source attribute.
135 Accepts an optional source, always return the current source.
136  
137 =head2 B<mp_members( [$mp_member] )>
138  
139 Accessor to the mp_members attribute.
140 Accepts an optional mp_member to be added to the mp_members array,
141 always return the current mp_members array.
142  
143 This attribute performs the same function as the members attribute above.
144 The difference is that mp-members allows both IPv4 and IPv6 address families
145 to be specified.
146  
147 Explicitly lists IPv4 or IPv6 'members' of the rtr-set can be:
148  
149 * inet-rtr objects
150 * other rtr-set objects
151 * ipv4 address
152 * ipv6 address
153  
154 =cut
155  
156 1;