EPP/Frame/Command/Transfer/Contact.pm

filter: Statementstmt 38.4% 10 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 33.3% 1 / 3 totaltotal 40.0% 14 / 35 CC 1 SCAR 4.1
CC
1
Cov
38%
new
2.0
setContact
2.0
setAuthInfo
2.0
CRAP 1.5
« EPP/Frame/Command/Renew/Domain.pm ↑ Summary EPP/Frame/Command/Poll/Ack.pm »
1 package Net::EPP::Frame::Command::Transfer::Contact;
2 1 ▶use base qw(Net::EPP::Frame::Command::Transfer);
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::Transfer::Contact - an instance of L<Net::EPP::Frame::Command::Transfer>
11 for contact objects.
12  
13 =head1 SYNOPSIS
14  
15 use Net::EPP::Frame::Command::Transfer::Contact;
16 use strict;
17  
18 my $info = Net::EPP::Frame::Command::Transfer::Contact->new;
19 $info->setOp('query');
20 $info->setContact('REG-12345');
21  
22 print $info->toString(1);
23  
24 This results in an XML document like this:
25  
26 <?xml version="1.0" encoding="UTF-8"?>
27 <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
28 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
29 xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0
30 epp-1.0.xsd">
31 <command>
32 <transfer op="query">
33 <contact:transfer
34 xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
35 xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0
36 contact-1.0.xsd">
37 <contact:id>REG-12345E<lt>/contact:id>
38 </contact:transfer>
39 </transfer>
40 <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt>
41 </command>
42 </epp>
43  
44 =head1 OBJECT HIERARCHY
45  
46 L<XML::LibXML::Node>
47 +----L<XML::LibXML::Document>
48 +----L<Net::EPP::Frame>
49 +----L<Net::EPP::Frame::Command>
50 +----L<Net::EPP::Frame::Command::Transfer>
51 +----L<Net::EPP::Frame::Command::Transfer::Contact>
52  
53 =cut
54  
55 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
56 0 my $package = shift;
57 0 my $self = bless($package->SUPER::new('transfer'), $package);
58  
59 0 my $contact = $self->addObject(Net::EPP::Frame::ObjectSpec->spec('contact'));
60  
61 0 return $self;
62 }
63  
64 =pod
65  
66 =head1 METHODS
67  
68 $frame->setContact($contactID);
69  
70 This specifies the contact object for the transfer.
71  
72 =cut
73  
74 0 ▶sub setContact {
Subroutine setContact: not called CC=1 SCAR=6.9
Pod undocumented
75 0 my ($self, $id) = @_;
76  
77 0 my $name = $self->createElement('contact:id');
78 0 $name->appendText($id);
79  
80 0 $self->getNode('transfer')->getChildNodes->shift->appendChild($name);
81  
82 0 return 1;
83 }
84  
85 =pod
86  
87 $frame->setAuthInfo($pw);
88  
89 This sets the authInfo code for the transfer.
90  
91 =cut
92  
93 0 ▶sub setAuthInfo {
Subroutine setAuthInfo: not called CC=1 SCAR=6.9
Pod undocumented
94 0 my ($self, $code) = @_;
95  
96 0 my $pw = $self->createElement('contact:pw');
97 0 $pw->appendText($code);
98  
99 0 my $authInfo = $self->createElement('contact:authInfo');
100 0 $authInfo->appendChild($pw);
101  
102 0 $self->getNode('transfer')->getChildNodes->shift->appendChild($authInfo);
103  
104 0 return 1;
105 }
106  
107 1 1;
« EPP/Frame/Command/Renew/Domain.pm ↑ Summary EPP/Frame/Command/Poll/Ack.pm »