line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::EPP::Frame::Command::Info::Domain; |
2
|
1
|
|
|
1
|
|
7
|
use base qw(Net::EPP::Frame::Command::Info); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
91
|
|
3
|
1
|
|
|
1
|
|
6
|
use Net::EPP::Frame::ObjectSpec; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
17
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
175
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=pod |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::EPP::Frame::Command::Info::Domain - an instance of L |
11
|
|
|
|
|
|
|
for domain names. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Net::EPP::Frame::Command::Info::Domain; |
16
|
|
|
|
|
|
|
use strict; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $info = Net::EPP::Frame::Command::Info::Domain->new; |
19
|
|
|
|
|
|
|
$info->setDomain('example.tld'); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
print $info->toString(1); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
This results in an XML document like this: |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
28
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 |
29
|
|
|
|
|
|
|
epp-1.0.xsd"> |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" |
34
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 |
35
|
|
|
|
|
|
|
domain-1.0.xsd"> |
36
|
|
|
|
|
|
|
example-1.tldE/domain:name> |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
0cf1b8f7e14547d26f03b7641660c641d9e79f45 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 OBJECT HIERARCHY |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
L |
46
|
|
|
|
|
|
|
+----L |
47
|
|
|
|
|
|
|
+----L |
48
|
|
|
|
|
|
|
+----L |
49
|
|
|
|
|
|
|
+----L |
50
|
|
|
|
|
|
|
+----L |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub new { |
55
|
0
|
|
|
0
|
1
|
|
my $package = shift; |
56
|
0
|
|
|
|
|
|
my $self = bless($package->SUPER::new('info'), $package); |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
my $domain = $self->addObject(Net::EPP::Frame::ObjectSpec->spec('domain')); |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
return $self; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=pod |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 METHODS |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
$frame->setDomain($domain_name, $hosts); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This specifies the domain name for which information is being requested. The |
70
|
|
|
|
|
|
|
C<$hosts> argument is the content of the C attribute (set to C |
71
|
|
|
|
|
|
|
by default). |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub setDomain { |
76
|
0
|
|
|
0
|
0
|
|
my ($self, $domain, $hosts) = @_; |
77
|
0
|
|
0
|
|
|
|
$hosts = ($hosts || 'all'); |
78
|
|
|
|
|
|
|
|
79
|
0
|
|
|
|
|
|
my $name = $self->createElement('domain:name'); |
80
|
0
|
|
|
|
|
|
$name->appendText($domain); |
81
|
0
|
|
|
|
|
|
$name->setAttribute('hosts', $hosts); |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
$self->getNode('info')->getChildNodes->shift->appendChild($name); |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return 1; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
1; |