RRP/Entity/Registrar.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a 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 / 28 CC 1 SCAR 6.9
CC
1
Cov
0%
getName
2.0
setAttribute
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::RRP::Entity::Registrar;
2  
3 use strict;
4 use Net::RRP::Entity;
5 use Net::RRP::Exception::InvalidAttributeName;
6 @Net::RRP::Entity::Registrar::ISA = qw(Net::RRP::Entity);
7 $Net::RRP::Entity::Registrar::VERSION = '0.1';
8  
9 =head1 NAME
10  
11 Net::RRP::Entity::Registrar - rrp registrar entity representation.
12  
13 =head1 SYNOPSIS
14  
15 use Net::RRP::Entity::Registrar;
16 my $registrarEntity = new Net::RRP::Entity::Registrar ( name => 'registrarname',
17 password => 'password',
18 .... );
19  
20 =head1 DESCRIPTION
21  
22 This is a rrp registrar entity representation class.
23  
24 =cut
25  
26 =head2 getName
27  
28 return a 'Registrar'
29  
30 =cut
31  
32 sub getName { 'Registrar' }
33  
34 =head2 setAttribute
35  
36 Add check constraint to attributes. Only name, password, techcontact, status may be exists
37  
38 =cut
39  
40 sub setAttribute
41 {
42 my ( $this, $key, $value ) = @_;
43 { registrarname => 1, password => 1, techcontact => 1, status => 1 }->{ lc ( $key ) } || throw Net::RRP::Exception::InvalidAttributeName ();
44 $this->SUPER::setAttribute ( $key => $value );
45 }
46  
47 1;
48  
49 =head1 AUTHOR AND COPYRIGHT
50  
51 Net::RRP::Entity::Registrar (C) Michael Kulakov, Zenon N.S.P. 2000
52 125124, 19, 1-st Jamskogo polja st,
53 Moscow, Russian Federation
54  
55 mkul@cpan.org
56  
57 All rights reserved.
58  
59 You may distribute this package under the terms of either the GNU
60 General Public License or the Artistic License, as specified in the
61 Perl README file.
62  
63 =head1 SEE ALSO
64  
65 L<Net::RRP::Entity(3)>, L<Net::RRP::Codec(3)>, RFC 2832,
66 L<Net::RRP::Exception::InvalidAttributeName(3)>
67  
68 =cut
69  
70 __END__