line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::EPP::Frame::Command::Renew::Domain; |
2
|
1
|
|
|
1
|
|
6
|
use base qw(Net::EPP::Frame::Command::Renew); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
94
|
|
3
|
1
|
|
|
1
|
|
6
|
use Net::EPP::Frame::ObjectSpec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
286
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=pod |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Net::EPP::Frame::Command::Renew::Domain - an instance of L |
12
|
|
|
|
|
|
|
for domain objects. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use Net::EPP::Frame::Command::Renew::Domain; |
17
|
|
|
|
|
|
|
use strict; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $info = Net::EPP::Frame::Command::Renew::Domain->new; |
20
|
|
|
|
|
|
|
$info->setDomain('example.tld'); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
print $info->toString(1); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This results in an XML document like this: |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
29
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 |
30
|
|
|
|
|
|
|
epp-1.0.xsd"> |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" |
35
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 |
36
|
|
|
|
|
|
|
domain-1.0.xsd"> |
37
|
|
|
|
|
|
|
example.tldE/domain:name> |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
0cf1b8f7e14547d26f03b7641660c641d9e79f45 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 OBJECT HIERARCHY |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
L |
47
|
|
|
|
|
|
|
+----L |
48
|
|
|
|
|
|
|
+----L |
49
|
|
|
|
|
|
|
+----L |
50
|
|
|
|
|
|
|
+----L |
51
|
|
|
|
|
|
|
+----L |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub new { |
56
|
0
|
|
|
0
|
1
|
|
my $package = shift; |
57
|
0
|
|
|
|
|
|
my $self = bless($package->SUPER::new('renew'), $package); |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
my $domain = $self->addObject(Net::EPP::Frame::ObjectSpec->spec('domain')); |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
return $self; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=pod |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 METHODS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
$frame->setDomain('example.tld'); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This method specifies the domain name for the renew. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub setDomain { |
75
|
0
|
|
|
0
|
0
|
|
my ($self, $domain) = @_; |
76
|
|
|
|
|
|
|
|
77
|
0
|
|
|
|
|
|
my $name = $self->createElement('domain:name'); |
78
|
0
|
|
|
|
|
|
$name->appendText($domain); |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
$self->getNode('renew')->getChildNodes->shift->appendChild($name); |
81
|
|
|
|
|
|
|
|
82
|
0
|
|
|
|
|
|
return 1; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=pod |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
$frame->period($years); |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This sets the optional renewal period. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub setPeriod { |
95
|
0
|
|
|
0
|
0
|
|
my ($self, $years) = @_; |
96
|
|
|
|
|
|
|
|
97
|
0
|
|
|
|
|
|
my $period = $self->createElement('domain:period'); |
98
|
0
|
|
|
|
|
|
$period->setAttribute('unit', 'y'); |
99
|
0
|
|
|
|
|
|
$period->appendText($years); |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
|
|
|
$self->getNode('renew')->getChildNodes->shift->appendChild($period); |
102
|
|
|
|
|
|
|
|
103
|
0
|
|
|
|
|
|
return 1; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=pod |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
$frame->setCurExpDate($date) |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
This sets the current expiry date for the domain. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub setCurExpDate { |
115
|
0
|
|
|
0
|
0
|
|
my ($self, $date) = @_; |
116
|
|
|
|
|
|
|
|
117
|
0
|
|
|
|
|
|
my $cur = $self->createElement('domain:curExpDate'); |
118
|
0
|
|
|
|
|
|
$cur->appendText($date); |
119
|
0
|
|
|
|
|
|
$self->getNode('renew')->getChildNodes->shift->appendChild($cur); |
120
|
|
|
|
|
|
|
|
121
|
0
|
|
|
|
|
|
return 1; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
1; |