EPP/Frame/Command/Info/Domain.pm

filter: Statementstmt 47.6% 10 / 21 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 60.0% 3 / 5 Podpod 50.0% 1 / 2 totaltotal 45.1% 14 / 31 CC 2 SCAR 10.4
CC
2
Cov
43%
setDomain
6.0
new
2.0
BEGIN
1.0
CRAP 2.8
« EPP/Frame/Response.pm ↑ Summary EPP/Frame/Command.pm »
1 package Net::EPP::Frame::Command::Info::Domain;
2 1 ▶use base qw(Net::EPP::Frame::Command::Info);
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::Info::Domain - an instance of L<Net::EPP::Frame::Command::Info>
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 <?xml version="1.0" encoding="UTF-8"?>
26 <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
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 <command>
31 <info>
32 <domain:info
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 <domain:name>example-1.tldE<lt>/domain:name>
37 </domain:info>
38 </info>
39 <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt>
40 </command>
41 </epp>
42  
43 =head1 OBJECT HIERARCHY
44  
45 L<XML::LibXML::Node>
46 +----L<XML::LibXML::Document>
47 +----L<Net::EPP::Frame>
48 +----L<Net::EPP::Frame::Command>
49 +----L<Net::EPP::Frame::Command::Info>
50 +----L<Net::EPP::Frame::Command::Info::Domain>
51  
52 =cut
53  
54 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
55 0 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<hosts> attribute (set to C<all>
71 by default).
72  
73 =cut
74  
75 0 ▶sub setDomain {
Subroutine setDomain: not called CC=2 SCAR=17.9
Pod undocumented
76 0 my ($self, $domain, $hosts) = @_;
77 0 ▶ $hosts = ($hosts || 'all');
Condition0%0/2
$hosts || 'all'
l!l
00
MC/DC0%0/1
$hosts || 'all'
$hosts
Truth table0%0/2
A
A= $hosts
Aresult
11
00
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 1;
« EPP/Frame/Response.pm ↑ Summary EPP/Frame/Command.pm »