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