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: Contact.pm,v 1.1 2011/12/03 11:44:52 gavin Exp $ |
6
|
|
|
|
|
|
|
package Net::EPP::Frame::Command::Transfer::Contact; |
7
|
1
|
|
|
1
|
|
4
|
use base qw(Net::EPP::Frame::Command::Transfer); |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
58
|
|
8
|
1
|
|
|
1
|
|
6
|
use Net::EPP::Frame::ObjectSpec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
9
|
1
|
|
|
1
|
|
11
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
168
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=pod |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Net::EPP::Frame::Command::Transfer::Contact - an instance of L |
16
|
|
|
|
|
|
|
for contact objects. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use Net::EPP::Frame::Command::Transfer::Contact; |
21
|
|
|
|
|
|
|
use strict; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $info = Net::EPP::Frame::Command::Transfer::Contact->new; |
24
|
|
|
|
|
|
|
$info->setOp('query'); |
25
|
|
|
|
|
|
|
$info->setContact('REG-12345'); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
print $info->toString(1); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
This results in an XML document like this: |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
34
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 |
35
|
|
|
|
|
|
|
epp-1.0.xsd"> |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" |
40
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0 |
41
|
|
|
|
|
|
|
contact-1.0.xsd"> |
42
|
|
|
|
|
|
|
REG-12345E/contact:id> |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
0cf1b8f7e14547d26f03b7641660c641d9e79f45 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 OBJECT HIERARCHY |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
L |
52
|
|
|
|
|
|
|
+----L |
53
|
|
|
|
|
|
|
+----L |
54
|
|
|
|
|
|
|
+----L |
55
|
|
|
|
|
|
|
+----L |
56
|
|
|
|
|
|
|
+----L |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub new { |
61
|
0
|
|
|
0
|
0
|
|
my $package = shift; |
62
|
0
|
|
|
|
|
|
my $self = bless($package->SUPER::new('transfer'), $package); |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
my $contact = $self->addObject(Net::EPP::Frame::ObjectSpec->spec('contact')); |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
return $self; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=pod |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 METHODS |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
$frame->setContact($contactID); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This specifies the contact object for the transfer. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub setContact { |
80
|
0
|
|
|
0
|
0
|
|
my ($self, $id) = @_; |
81
|
|
|
|
|
|
|
|
82
|
0
|
|
|
|
|
|
my $name = $self->createElement('contact:id'); |
83
|
0
|
|
|
|
|
|
$name->appendText($id); |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
$self->getNode('transfer')->getChildNodes->shift->appendChild($name); |
86
|
|
|
|
|
|
|
|
87
|
0
|
|
|
|
|
|
return 1; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=pod |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
$frame->setAuthInfo($pw); |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This sets the authInfo code for the transfer. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub setAuthInfo { |
99
|
0
|
|
|
0
|
0
|
|
my ($self, $code) = @_; |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
|
|
|
my $pw = $self->createElement('contact:pw'); |
102
|
0
|
|
|
|
|
|
$pw->appendText($code); |
103
|
|
|
|
|
|
|
|
104
|
0
|
|
|
|
|
|
my $authInfo = $self->createElement('contact:authInfo'); |
105
|
0
|
|
|
|
|
|
$authInfo->appendChild($pw); |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
|
|
|
$self->getNode('transfer')->getChildNodes->shift->appendChild($authInfo); |
108
|
|
|
|
|
|
|
|
109
|
0
|
|
|
|
|
|
return 1; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=pod |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 AUTHOR |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
CentralNic Ltd (http://www.centralnic.com/). |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 COPYRIGHT |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This module is (c) 2016 CentralNic Ltd. This module is free software; you can |
121
|
|
|
|
|
|
|
redistribute it and/or modify it under the same terms as Perl itself. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 SEE ALSO |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=over |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item * L |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=back |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
1; |