line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::EPP::Frame::Command::Check::Host; |
2
|
1
|
|
|
1
|
|
7
|
use base qw(Net::EPP::Frame::Command::Check); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
94
|
|
3
|
1
|
|
|
1
|
|
7
|
use Net::EPP::Frame::ObjectSpec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
157
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=pod |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::EPP::Frame::Command::Check::Host - an instance of L |
11
|
|
|
|
|
|
|
for host objects. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Net::EPP::Frame::Command::Check::Host; |
16
|
|
|
|
|
|
|
use strict; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $check = Net::EPP::Frame::Command::Check::Host->new; |
19
|
|
|
|
|
|
|
$check->addHost('example-1.tld'); |
20
|
|
|
|
|
|
|
$check->addHost('example-2.tld'); |
21
|
|
|
|
|
|
|
$check->addHost('example-2.tld'); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
print $check->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:host="urn:ietf:params:xml:ns:host-1.0" |
36
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:host-1.0 |
37
|
|
|
|
|
|
|
host-1.0.xsd"> |
38
|
|
|
|
|
|
|
ns0.example-1.tldE/host:name> |
39
|
|
|
|
|
|
|
ns1.example-2.tldE/host:name> |
40
|
|
|
|
|
|
|
ns2.example-3.tldE/host:name> |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
0cf1b8f7e14547d26f03b7641660c641d9e79f45 |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 OBJECT HIERARCHY |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
L |
50
|
|
|
|
|
|
|
+----L |
51
|
|
|
|
|
|
|
+----L |
52
|
|
|
|
|
|
|
+----L |
53
|
|
|
|
|
|
|
+----L |
54
|
|
|
|
|
|
|
+----L |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub new { |
59
|
0
|
|
|
0
|
1
|
|
my $package = shift; |
60
|
0
|
|
|
|
|
|
my $self = bless($package->SUPER::new('check'), $package); |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
$self->addObject(Net::EPP::Frame::ObjectSpec->spec('host')); |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
return $self; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=pod |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 METHODS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
$frame->addHost($host_name); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This adds a hostname to the list of hosts to be checked. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub addHost { |
78
|
0
|
|
|
0
|
0
|
|
my ($self, $host) = @_; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
my $name = $self->createElement('host:name'); |
81
|
0
|
|
|
|
|
|
$name->appendText($host); |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
$self->getNode('check')->getChildNodes->shift->appendChild($name); |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return 1; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
1; |