EPP/Frame/Command/Check/Domain.pm

filter: Statementstmt 52.6% 10 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 50.0% 1 / 2 totaltotal 53.8% 14 / 26 CC 1 SCAR 3.4
CC
1
Cov
53%
new
2.0
addDomain
2.0
BEGIN
1.0
CRAP 1.4
« EPP/Frame/Command/Check/Contact.pm ↑ Summary EPP/Frame/Command/Check/Host.pm »
1 package Net::EPP::Frame::Command::Check::Domain;
2 1 ▶use base qw(Net::EPP::Frame::Command::Check);
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Net::EPP::Frame::ObjectSpec;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =pod
7  
8 =head1 NAME
9  
10 Net::EPP::Frame::Command::Check::Domain - an instance of L<Net::EPP::Frame::Command::Check>
11 for domain names.
12  
13 =head1 SYNOPSIS
14  
15 use Net::EPP::Frame::Command::Check::Domain;
16 use strict;
17  
18 my $check = Net::EPP::Frame::Command::Check::Domain->new;
19 $check->addDomain('example-1.tld');
20 $check->addDomain('example-2.tld');
21 $check->addDomain('example-2.tld');
22  
23 print $check->toString(1);
24  
25 This results in an XML document like this:
26  
27 <?xml version="1.0" encoding="UTF-8"?>
28 <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
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 <command>
33 <check>
34 <domain:check
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 <domain:name>example-1.tldE<lt>/domain:name>
39 <domain:name>example-2.tldE<lt>/domain:name>
40 <domain:name>example-3.tldE<lt>/domain:name>
41 </domain:check>
42 </check>
43 <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt>
44 </command>
45 </epp>
46  
47 =head1 OBJECT HIERARCHY
48  
49 L<XML::LibXML::Node>
50 +----L<XML::LibXML::Document>
51 +----L<Net::EPP::Frame>
52 +----L<Net::EPP::Frame::Command>
53 +----L<Net::EPP::Frame::Command::Check>
54 +----L<Net::EPP::Frame::Command::Check::Domain>
55  
56 =cut
57  
58 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
59 0 my $package = shift;
60 0 my $self = bless($package->SUPER::new('check'), $package);
61  
62 0 $self->addObject(Net::EPP::Frame::ObjectSpec->spec('domain'));
63  
64 0 return $self;
65 }
66  
67 =pod
68  
69 =head1 METHODS
70  
71 $frame->addDomain($domain_name);
72  
73 This adds a domain name to the list of domains to be checked.
74  
75 =cut
76  
77 0 ▶sub addDomain {
Subroutine addDomain: not called CC=1 SCAR=6.9
Pod undocumented
78 0 my ($self, $domain) = @_;
79  
80 0 my $name = $self->createElement('domain:name');
81 0 $name->appendText($domain);
82  
83 0 $self->getNode('check')->getChildNodes->shift->appendChild($name);
84  
85 0 return 1;
86 }
87  
88 1 1;
« EPP/Frame/Command/Check/Contact.pm ↑ Summary EPP/Frame/Command/Check/Host.pm »