line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2016 CentralNic Ltd. All rights reserved. This program is |
2
|
|
|
|
|
|
|
# free software; you can redistribute it and/or modify it under the same |
3
|
|
|
|
|
|
|
# terms as Perl itself. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: Command.pm,v 1.4 2011/12/03 11:44:51 gavin Exp $ |
6
|
|
|
|
|
|
|
package Net::EPP::Frame::Command; |
7
|
1
|
|
|
1
|
|
300
|
use Net::EPP::Frame::Command::Check; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
17
|
|
8
|
1
|
|
|
1
|
|
342
|
use Net::EPP::Frame::Command::Create; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
9
|
1
|
|
|
1
|
|
297
|
use Net::EPP::Frame::Command::Delete; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
10
|
1
|
|
|
1
|
|
305
|
use Net::EPP::Frame::Command::Info; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
11
|
1
|
|
|
1
|
|
325
|
use Net::EPP::Frame::Command::Login; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
12
|
1
|
|
|
1
|
|
315
|
use Net::EPP::Frame::Command::Logout; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
13
|
1
|
|
|
1
|
|
336
|
use Net::EPP::Frame::Command::Poll; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
14
|
1
|
|
|
1
|
|
305
|
use Net::EPP::Frame::Command::Renew; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
15
|
1
|
|
|
1
|
|
309
|
use Net::EPP::Frame::Command::Transfer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
16
|
1
|
|
|
1
|
|
385
|
use Net::EPP::Frame::Command::Update; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
17
|
1
|
|
|
1
|
|
3
|
use base qw(Net::EPP::Frame); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
253
|
|
18
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
298
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=pod |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Net::EPP::Frame::Command - an instance of L for client commands |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 DESCRIPTION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
This module is a base class for the Net::EPP::Frame::* subclasses, you should |
29
|
|
|
|
|
|
|
never need to access it directly. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 OBJECT HIERARCHY |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
L |
34
|
|
|
|
|
|
|
+----L |
35
|
|
|
|
|
|
|
+----L |
36
|
|
|
|
|
|
|
+----L |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub new { |
42
|
0
|
|
|
0
|
0
|
|
my $package = shift; |
43
|
0
|
|
|
|
|
|
my $self = $package->SUPER::new('command'); |
44
|
0
|
|
|
|
|
|
return bless($self, $package); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub addObject() { |
48
|
0
|
|
|
0
|
0
|
|
my ($self, $object, $ns, $schema) = @_; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my $obj = $self->createElement($self->getCommandType); |
51
|
0
|
|
|
|
|
|
$obj->setNamespace($ns, $object); |
52
|
0
|
|
|
|
|
|
$self->getNode($self->getCommandType)->addChild($obj); |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
return $obj; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub _addExtraElements { |
58
|
0
|
|
|
0
|
|
|
my $self = shift; |
59
|
|
|
|
|
|
|
|
60
|
0
|
0
|
|
|
|
|
$self->command->addChild($self->createElement($self->getCommandType)) if ($self->getCommandType ne ''); |
61
|
0
|
|
|
|
|
|
$self->command->addChild($self->createElement('clTRID')); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
$self->_addCommandElements; |
64
|
0
|
|
|
|
|
|
return 1; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
0
|
|
|
sub _addCommandElements { |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=pod |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 METHODS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my $object = $frame->addObject(@spec); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This method creates and returns a new element corresponding to the data in |
77
|
|
|
|
|
|
|
C<@spec>, and appends it to the "command" element (as returned by the |
78
|
|
|
|
|
|
|
C method below). |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The L module can be used to quickly retrieve EPP |
81
|
|
|
|
|
|
|
object specifications. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my $type = $frame->getCommandType; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This method returns a scalar containing the command type (eg L<'create'>). |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
my $type = $frame->getCommandNode; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This method returns the L object corresponding to the |
90
|
|
|
|
|
|
|
command in question, eg the CcreateE> element (for a |
91
|
|
|
|
|
|
|
L object). It is within this element that |
92
|
|
|
|
|
|
|
EPP objects are placed. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
my $node = $frame->command; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This method returns the L object corresponding to the |
97
|
|
|
|
|
|
|
CcommandE> element. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
my $node = $frame->clTRID; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This method returns the L object corresponding to the |
102
|
|
|
|
|
|
|
CclTRIDE> element. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub getCommandType { |
107
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
108
|
0
|
|
|
|
|
|
my $type = ref($self); |
109
|
0
|
|
|
|
|
|
my $me = __PACKAGE__; |
110
|
0
|
|
|
|
|
|
$type =~ s/^$me\:+//; |
111
|
0
|
|
|
|
|
|
$type =~ s/\:{2}.+//; |
112
|
0
|
|
|
|
|
|
return lc($type); |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
sub getCommandNode { |
116
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
117
|
0
|
|
|
|
|
|
return $self->getNode($self->getCommandType); |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
0
|
|
|
0
|
1
|
|
sub command { $_[0]->getNode('command') } |
121
|
0
|
|
|
0
|
0
|
|
sub clTRID { $_[0]->getNode('clTRID') } |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=pod |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 AUTHOR |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
CentralNic Ltd (http://www.centralnic.com/). |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 COPYRIGHT |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
This module is (c) 2016 CentralNic Ltd. This module is free software; you can |
132
|
|
|
|
|
|
|
redistribute it and/or modify it under the same terms as Perl itself. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 SEE ALSO |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=over |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item * L |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=back |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=cut |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
1; |