Object/KeyCert/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 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::Whois::Object::KeyCert::AFRINIC;
2  
3 use strict;
4 use warnings;
5 use base qw/Net::Whois::Object/;
6  
7 # whois -t key-cert -h whois.afrinic.net
8 # % This is the AfriNIC Whois server.
9 #
10 # key-cert: [mandatory] [single] [primary/look-up key]
11 # method: [generated] [single] [ ]
12 # owner: [generated] [multiple] [ ]
13 # fingerpr: [generated] [single] [inverse key]
14 # certif: [mandatory] [multiple] [ ]
15 # org: [optional] [multiple] [inverse key]
16 # remarks: [optional] [multiple] [ ]
17 # notify: [optional] [multiple] [inverse key]
18 # admin-c: [optional] [multiple] [inverse key]
19 # tech-c: [optional] [multiple] [inverse key]
20 # mnt-by: [mandatory] [multiple] [inverse key]
21 # changed: [mandatory] [multiple] [ ]
22 # source: [mandatory] [single] [ ]
23  
24 __PACKAGE__->attributes( 'primary', ['key_cert'] );
25 __PACKAGE__->attributes( 'mandatory', [ 'key_cert', 'certif', 'mnt_by', 'changed', 'source' ] );
26 __PACKAGE__->attributes( 'optional', [ 'method', 'owner', 'fingerpr', 'org', 'remarks', 'notify', 'admin_c', 'tech_c' ] );
27 __PACKAGE__->attributes( 'single', [ 'key_cert', 'method', 'fingerpr', 'source' ] );
28 __PACKAGE__->attributes( 'multiple', [ 'owner', 'certif', 'org', 'remarks', 'notify', 'admin_c', 'tech_c', 'mnt_by', 'changed' ] );
29  
30  
31 =head1 NAME
32  
33 Net::Whois::Object::KeyCert::AFRINIC - an object representation of the RPSL KeyCert block
34  
35 =head1 DESCRIPTION
36  
37 A key-cert object is a database public key certificate that is stored
38 on the server and may be used with a mntner object for authentication
39 when performing updates. Currently only PGP keys are supported.
40  
41 =head1 METHODS
42  
43 =head2 B<new( %options )>
44  
45 Constructor for the Net::Whois::Object::InetRtr class
46  
47 =cut
48  
49 sub new {
50 my ( $class, @options ) = @_;
51  
52 my $self = bless {}, $class;
53 $self->_init(@options);
54  
55 return $self;
56 }
57  
58 =head2 B<key_cert( [$key_cert] )>
59  
60 Accessor to the key_cert attribute.
61 Accepts an optional key_cert value, always return the current key_cert value.
62  
63 For PGP KeyCert objects, the value of the key_cert attribute must be
64 PGP-"key-id". These keys are compliant with the Open PGP Internet Standard.
65  
66 For X.509 KeyCert objects, the database software assigns this value as
67 X.509-n. Here, 'n' is the next available number assigned by the software. If
68 you want to create an X.509 KeyCert object, you should specify the value as
69 AUTO-xx. If you delete an X.509 KeyCert object, it is not possible to
70 recreate it with the same name.
71  
72 =head2 B<method( [$method] )>
73  
74 Accessor to the method attribute.
75 Accepts an optional method, always return the current method value.
76  
77 The method attribute is generated by the software.
78 It is not necessary to include this attribute when you create or
79 modify this object. If it is supplied, the software will check the value.
80 If necessary the software will replace the supplied value with generated
81 value. In this case a warning is returned to the user.
82  
83 =head2 B<owner( [$owner] )>
84  
85 Accessor to the owner attribute.
86 Accepts an optional owner to be added to the owner array,
87 always return the current owner array.
88  
89 The owner attribute is generated by the software.
90 It is not necessary to include this attribute when you create or
91 modify this object. If it is supplied, the software will check the value.
92 If necessary the software will replace the supplied value with generated
93 value. In this case a warning is returned to the user.
94  
95 =head2 B<fingerpr( [$fingerpr] )>
96  
97 Accessor to the fingerpr attribute.
98 Accepts an optional fingerpr, always return the current fingerpr.
99  
100 The fingerpr attribute is generated by the software.
101 It is not necessary to include this attribute when you create or
102 modify this object. If it is supplied, the software will check the value.
103 If necessary the software will replace the supplied value with generated
104 value. In this case a warning is returned to the user.
105  
106 =head2 B<certif( [$certif] )>
107  
108 Accessor to the certif attribute.
109 Accepts an optional certif to be added to the certif array,
110 always return the current certif array.
111  
112 The certif attribute contains the public key. The value of the public key
113 should be supplied either using multiple certif attributes, or in one
114 certif attribute split over several lines. In the first case, this is
115 easily done by exporting the key from your local key ring in ASCII armored
116 format and adding the string certif to the start of each line of the key.
117 In the second case, line continuation should be used to represent an ASCII
118 armored format of the key. All the lines of the exported key must be included,
119 as well as the start/end markers and the empty line which separates the header
120 from the key body.
121  
122 =head2 B<remarks( [$remark] )>
123  
124 Accessor to the remarks attribute.
125 Accepts an optional remark to be added to the remarks array,
126 always return the current remarks array.
127  
128 General remarks. May include a URL or email address.
129  
130 =head2 B<org( [$org] )>
131  
132 Accessor to the org attribute.
133 Accepts an optional org value to be added to the org array,
134 always return the current org array.
135  
136 The organisation entity this object is bound to.
137  
138 =head2 B<notify( [$notify] )>
139  
140 Accessor to the notify attribute.
141 Accepts an optional notify value to be added to the notify array,
142 always return the current notify array.
143  
144 The email address to which notifications of changes to this object should be
145 sent.
146  
147 =head2 B<admin_c( [$contact] )>
148  
149 Accessor to the admin_c attribute.
150 Accepts an optional contact to be added to the admin_c array,
151 always return the current admin_c array.
152  
153 The NIC-handle of an on-site contact Person object. As more than one person
154 often fulfills a role function, there may be more than one admin_c listed.
155  
156 An administrative contact (admin_c) must be someone who is physically
157 located at the site of the network.
158  
159 =head2 B<tech_c( [$contact] )>
160  
161 Accessor to the tech_c attribute.
162 Accepts an optional contact to be added to the tech_c array,
163 always return the current tech_c array.
164  
165 The NIC-handle of a technical contact Person or Role object. As more than
166 one person often fulfills a role function, there may be more than one tech_c
167 listed.
168  
169 A technical contact (tech_c) must be a person responsible for the
170 day-to-day operation of the network, but does not need to be
171 physically located at the site of the network.
172  
173 =head2 B<mnt_by( [$mnt_by] )>
174  
175 Accessor to the mnt_by attribute.
176 Accepts an optional mnt_by value to be added to the mnt_by array,
177 always return the current mnt_by array.
178  
179 Lists a registered Mntner used to authorize and authenticate changes to this
180 object.
181  
182  
183 =head2 B<changed( [$changed] )>
184  
185 Accessor to the changed attribute.
186 Accepts an optional changed value to be added to the changed array,
187 always return the current changed array.
188  
189 The email address of who last updated the database object and the date it
190 occurred.
191  
192 Every time a change is made to a database object, this attribute will show
193 the email address of the person who made those changes.
194 Please use the address format specified in RFC 822 - Standard for
195 the Format of ARPA Internet Text Message and provide the date
196 format using one of the following two formats: YYYYMMDD or YYMMDD.
197  
198 =head2 B<source( [$source] )>
199  
200 Accessor to the source attribute.
201 Accepts an optional source, always return the current source.
202  
203 The database where the object is registered.
204  
205 =cut
206  
207 1;