EPP/Frame/Command/Delete/Host.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
setHost
2.0
BEGIN
1.0
CRAP 1.4
« EPP/Frame/Command/Delete/Domain.pm ↑ Summary EPP/Frame/Command/Info/Contact.pm »
1 package Net::EPP::Frame::Command::Delete::Host;
2 1 ▶use base qw(Net::EPP::Frame::Command::Delete);
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::Delete::Host - an instance of L<Net::EPP::Frame::Command::Delete>
11 for host objects.
12  
13 =head1 SYNOPSIS
14  
15 use Net::EPP::Frame::Command::Delete::Host;
16 use strict;
17  
18 my $delete = Net::EPP::Frame::Command::Delete::Host->new;
19 $delete->setHost('example.tld');
20  
21 print $delete->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 <delete>
32 <host:delete
33 xmlns:host="urn:ietf:params:xml:ns:host-1.0"
34 xsi:schemaLocation="urn:ietf:params:xml:ns:host-1.0
35 host-1.0.xsd">
36 <host:name>ns0.example.tldE<lt>/host:name>
37 </host:delete>
38 </delete>
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::Delete>
50 +----L<Net::EPP::Frame::Command::Delete::Host>
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('delete'), $package);
57  
58 0 my $host = $self->addObject(Net::EPP::Frame::ObjectSpec->spec('host'));
59  
60 0 return $self;
61 }
62  
63 =pod
64  
65 =head1 METHODS
66  
67 $frame->setHost($host_name);
68  
69 This specifies the host object to be deleted.
70  
71 =cut
72  
73 0 ▶sub setHost {
Subroutine setHost: not called CC=1 SCAR=6.9
Pod undocumented
74 0 my ($self, $host) = @_;
75  
76 0 my $name = $self->createElement('host:name');
77 0 $name->appendText($host);
78  
79 0 $self->getNode('delete')->getChildNodes->shift->appendChild($name);
80  
81 0 return 1;
82 }
83  
84 1 1;
« EPP/Frame/Command/Delete/Domain.pm ↑ Summary EPP/Frame/Command/Info/Contact.pm »