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: Domain.pm,v 1.4 2011/12/03 11:44:52 gavin Exp $ |
6
|
|
|
|
|
|
|
package Net::EPP::Frame::Command::Check::Domain; |
7
|
1
|
|
|
1
|
|
5
|
use base qw(Net::EPP::Frame::Command::Check); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
76
|
|
8
|
1
|
|
|
1
|
|
290
|
use Net::EPP::Frame::ObjectSpec; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
9
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
100
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=pod |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Net::EPP::Frame::Command::Check::Domain - an instance of L |
16
|
|
|
|
|
|
|
for domain names. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use Net::EPP::Frame::Command::Check::Domain; |
21
|
|
|
|
|
|
|
use strict; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $check = Net::EPP::Frame::Command::Check::Domain->new; |
24
|
|
|
|
|
|
|
$check->addDomain('example-1.tld'); |
25
|
|
|
|
|
|
|
$check->addDomain('example-2.tld'); |
26
|
|
|
|
|
|
|
$check->addDomain('example-2.tld'); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
print $check->toString(1); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This results in an XML document like this: |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
35
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 |
36
|
|
|
|
|
|
|
epp-1.0.xsd"> |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" |
41
|
|
|
|
|
|
|
xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 |
42
|
|
|
|
|
|
|
domain-1.0.xsd"> |
43
|
|
|
|
|
|
|
example-1.tldE/domain:name> |
44
|
|
|
|
|
|
|
example-2.tldE/domain:name> |
45
|
|
|
|
|
|
|
example-3.tldE/domain:name> |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
0cf1b8f7e14547d26f03b7641660c641d9e79f45 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 OBJECT HIERARCHY |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
L |
55
|
|
|
|
|
|
|
+----L |
56
|
|
|
|
|
|
|
+----L |
57
|
|
|
|
|
|
|
+----L |
58
|
|
|
|
|
|
|
+----L |
59
|
|
|
|
|
|
|
+----L |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub new { |
64
|
0
|
|
|
0
|
0
|
|
my $package = shift; |
65
|
0
|
|
|
|
|
|
my $self = bless($package->SUPER::new('check'), $package); |
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
$self->addObject(Net::EPP::Frame::ObjectSpec->spec('domain')); |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
return $self; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=pod |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 METHODS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
$frame->addDomain($domain_name); |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This adds a domain name to the list of domains to be checked. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub addDomain { |
83
|
0
|
|
|
0
|
0
|
|
my ($self, $domain) = @_; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
my $name = $self->createElement('domain:name'); |
86
|
0
|
|
|
|
|
|
$name->appendText($domain); |
87
|
|
|
|
|
|
|
|
88
|
0
|
|
|
|
|
|
$self->getNode('check')->getChildNodes->shift->appendChild($name); |
89
|
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
return 1; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=pod |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 AUTHOR |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
CentralNic Ltd (http://www.centralnic.com/). |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 COPYRIGHT |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This module is (c) 2016 CentralNic Ltd. This module is free software; you can |
102
|
|
|
|
|
|
|
redistribute it and/or modify it under the same terms as Perl itself. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 SEE ALSO |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=over |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item * L |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=back |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
1; |