EPP/Frame/Command/Check/Contact.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
addContact
2.0
BEGIN
1.0
CRAP 1.4
« EPP/Frame/Command/Poll/Ack.pm ↑ Summary EPP/Frame/Command/Check/Domain.pm »
1 package Net::EPP::Frame::Command::Check::Contact;
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::Contact - an instance of L<Net::EPP::Frame::Command::Check>
11 for contact objects.
12  
13 =head1 SYNOPSIS
14  
15 use Net::EPP::Frame::Command::Check::Contact;
16 use strict;
17  
18 my $check = Net::EPP::Frame::Command::Check::Contact->new;
19 $check->addContact('contact-id-01');
20 $check->addContact('contact-id-02');
21 $check->addContact('contact-id-03');
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 <contact:check
35 xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
36 xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0
37 contact-1.0.xsd">
38 <contact:id>contact-id-01E<lt>/contact:id>
39 <contact:id>contact-id-02E<lt>/contact:id>
40 <contact:id>contact-id-03E<lt>/contact:id>
41 </contact: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::Contact>
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('contact'));
63  
64 0 return $self;
65 }
66  
67 =pod
68  
69 =head1 METHODS
70  
71 $frame->addContact($contact_id);
72  
73 This adds a contact ID to the list of contacts to be checked.
74  
75 =cut
76  
77 0 ▶sub addContact {
Subroutine addContact: not called CC=1 SCAR=6.9
Pod undocumented
78 0 my ($self, $contact) = @_;
79  
80 0 my $name = $self->createElement('contact:id');
81 0 $name->appendText($contact);
82  
83 0 $self->getNode('check')->getChildNodes->shift->appendChild($name);
84  
85 0 return 1;
86 }
87  
88 1 1;
« EPP/Frame/Command/Poll/Ack.pm ↑ Summary EPP/Frame/Command/Check/Domain.pm »