EPP/RRPProxy.pm

filter: Statementstmt 10.2% 14 / 137 Branchbran 0.0% 0 / 72 Conditioncond 0.0% 0 / 31 MC/DCmcdc 0.0% 0 / 17 Subroutinesub 26.6% 4 / 15 Podpod 100% 10 / 10 totaltotal 9.9% 28 / 282 SCAR 78.2
CC
54
Cov
6%
transfer
156.0
make_request
132.0
create_domain
110.0
CRAP 2488.9
« EPP/Test/Base.pm ↑ Summary EPP/Test/VerisignCore.pm »
1 package IO::EPP::RRPProxy;
2  
3 =encoding utf8
4  
5 =head1 NAME
6  
7 IO::EPP::RRPProxy
8  
9 =head1 SYNOPSIS
10  
11 use IO::EPP::RRPProxy;
12  
13 # Parameters for IO::Socket::SSL
14 my %sock_params = (
15 PeerHost => 'epp.rrpproxy.net',
16 PeerPort => 700,
17 Timeout => 30,
18 );
19  
20 # Create object, get greeting and call login()
21 my $conn = IO::EPP::RRPProxy->new( {
22 user => 'login',
23 pass => 'xxxxx',
24 sock_params => \%sock_params,
25 test_mode => 0, # real connect
26 } );
27  
28 # Check domain
29 my ( $answ, $code, $msg ) = $conn->check_domains( { domains => [ 'info.name', 'name.info' ] } );
30  
31 # Call logout() and destroy object
32 undef $conn;
33  
34 =head1 DESCRIPTION
35  
36 Work with RRPProxy EPP API
37  
38 Features:
39  
40 =over 3
41  
42 item *
43  
44 has its own epp extension <keysys:*> for specifying additional parameters;
45  
46 =item *
47  
48 has additional functions.
49  
50 =back
51  
52 Examples: L<https://wiki.rrpproxy.net/EPP>, L<https://wiki.rrpproxy.net/api/epp-server/epp-command-reference>.
53  
54 =cut
55  
56 1 ▶use IO::EPP::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
57 1 ▶use parent qw( IO::EPP::Base );
Subroutine BEGIN: called CC=1 SCAR=0.0
58  
59 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
60 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
61  
62 1 my $ks_ext = 'xmlns:keysys="http://www.key-systems.net/epp/keysys-1.0"';
63  
64 sub make_request {
65 0 ▶ my ( $action, $params ) = @_;
Subroutine make_request: not called CC=11 SCAR=48.8
Pod documented
66  
67 0 my ( $self, $code, $msg, $answ );
68  
69 0 ▶ unless ( $params->{conn} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($params->{'conn'}) { } 0 0 0
70 0 ▶ $params->{sock_params}{PeerHost} ||= 'epp.rrpproxy.net';
Condition0%0/2
$params->{"sock_params"}{"PeerHost"} ||= "epp.rrpproxy.net"
l!l
00
MC/DC0%0/1
$params->{"sock_params"}{"PeerHost"} ||= "epp.rrpproxy.net"
$params->{"sock_params"}{"PeerHost"}
Truth table0%0/2
A
A= $params->{"sock_params"}{"PeerHost"}
Aresult
11
00
71 0 ▶ $params->{sock_params}{PeerPort} ||= 700;
Condition0%0/2
$params->{"sock_params"}{"PeerPort"} ||= 700
l!l
00
MC/DC0%0/1
$params->{"sock_params"}{"PeerPort"} ||= 700
$params->{"sock_params"}{"PeerPort"}
Truth table0%0/2
A
A= $params->{"sock_params"}{"PeerPort"}
Aresult
11
00
72  
73 0 ( $self, $code, $msg ) = __PACKAGE__->new( $params );
74  
75 0 ▶ unless ( $code and $code == 1000 ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($code and $code == 1000) 0 0 0
Condition0%0/3
$code and $code == 1000
!ll&&!rl&&r
000
MC/DC0%0/2
$code and $code == 1000
$code $code == 1000
Truth table0%0/3
A and B
A= $codeB= $code == 1000
ABresult
0X0
100
111
76 0 goto END_MR;
77 }
78 }
79 else {
80 0 $self = $params->{conn};
81 }
82  
83  
84 0 $self->{critical_error} = '';
85  
86 0 ▶ if ( $self->can( $action ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can($action)) { } 0 0 0
87 0 ( $answ, $code, $msg ) = $self->$action( $params );
88 }
89 else {
90 0 $msg = "undefined command <$action>, request cancelled";
91 0 $code = 0;
92 }
93  
94  
95 END_MR:
96  
97 0 ▶ $msg .= '; ' . $self->{critical_error} if $self->{critical_error};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"critical_error"} 0 0 0
98  
99 0 my $full_answ = "code: $code\nmsg: $msg";
100  
101 0 ▶ $answ = {} unless $answ && ref $answ;
Branch: 1 branch
BranchTrueFalseTotal
unless $answ and ref $answ 0 0 0
Condition0%0/3
$answ and ref $answ
!ll&&!rl&&r
000
MC/DC0%0/2
$answ and ref $answ
$answ ref $answ
Truth table0%0/3
A and B
A= $answB= ref $answ
ABresult
0X0
100
111
102  
103 0 $answ->{code} = $code;
104 0 $answ->{msg} = $msg;
105  
106 0 ▶ return wantarray ? ( $answ, $full_answ, $self ) : $answ;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
107 }
108  
109 =head1 METHODS
110  
111 Further overlap functions where the provider has features
112  
113 =head2 login
114  
115 Ext params for login,
116  
117 INPUT: new password for change
118  
119 =cut
120  
121 sub login {
122 0 ▶ my ( $self, $pw ) = @_;
Subroutine login: not called CC=1 SCAR=6.9
Pod documented
123  
124 0 my $svcs = '
125 <objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
126 <objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
127 <objURI>urn:ietf:params:xml:ns:host-1.0</objURI>';
128  
129 0 my $extension = '
130 <extURI>http://www.key-systems.net/epp/keysys-1.0</extURI>
131 <extURI>http://www.key-systems.net/epp/query-1.0</extURI>
132 <extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
133 <extURI>urn:ietf:params:xml:ns:rgp-1.0</extURI>
134 <extURI>urn:ietf:params:xml:ns:launchphase-1.0</extURI>
135 <extURI>urn:ietf:params:xml:ns:launch-1.0</extURI>
136 <extURI>urn:ietf:params:xml:ns:idn-1.0</extURI>
137 <extURI>urn:ietf:params:xml:ns:fee-0.7</extURI>';
138  
139 0 return $self->SUPER::login( $pw, $svcs, $extension );
140 }
141  
142 =head2 create_contact
143  
144 Contact id is generated automatically by the reseller
145  
146 =cut
147  
148 sub create_contact {
149 0 ▶ my ( $self, $params ) = @_;
Subroutine create_contact: not called CC=5 SCAR=34.0
Pod documented
150  
151 0 $params->{id} = 'AUTO';
152  
153 0 ▶ $params->{company} =~ s/&/&amp;/g if $params->{company};
Branch: 1 branch
BranchTrueFalseTotal
if $params->{"company"} 0 0 0
154 0 ▶ $params->{addr} =~ s/&/&amp;/g if $params->{addr};
Branch: 1 branch
BranchTrueFalseTotal
if $params->{"addr"} 0 0 0
155  
156 =pod
157  
158 For german characters changes html codes to double symbols:
159 ß = ss
160 ä = ae
161 ü = ue
162 ö = oe
163  
164 =cut
165 0 foreach my $f ( 'name', 'company', 'addr', 'city', 'state' ) {
166 0 ▶ next unless $params->{$f};
Branch: 1 branch
BranchTrueFalseTotal
unless $params->{$f} 0 0 0
167  
168 0 $params->{$f} =~ s/&#196;/Ae/g;
169 0 $params->{$f} =~ s/&#214;/Oe/g;
170 0 $params->{$f} =~ s/&#220;/Ue/g;
171 0 $params->{$f} =~ s/&#223;/ss/g;
172 0 $params->{$f} =~ s/&#228;/ae/g;
173 0 $params->{$f} =~ s/&#246;/oe/g;
174 0 $params->{$f} =~ s/&#252;/ue/g;
175 }
176  
177 # the extension fields must be arranged in alphabetical order
178  
179 0 my $fields = "\n <keysys:forceDuplication>1</keysys:forceDuplication>\n";
180  
181 # each contact is registered separately even if they are the same
182 $params->{extension} =
183 0 qq| <keysys:create $ks_ext>
184 <keysys:contact>$fields
185 </keysys:contact>
186 </keysys:create>
187 |;
188  
189 0 return $self->SUPER::create_contact( $params );
190 }
191  
192  
193 =head2 check_claims
194  
195 Get info on Claims Notice
196  
197 For details see L<https://tools.ietf.org/html/draft-tan-epp-launchphase-12>
198  
199 INPUT:
200  
201 key of params:
202 C<dname> -- domain name
203  
204 =cut
205  
206 sub check_claims {
207 0 ▶ my ( $self, $params ) = @_;
Subroutine check_claims: not called CC=1 SCAR=6.9
Pod documented
208  
209 0 $params->{domains} = [ $params->{dname} ];
210  
211 $params->{extension} =
212 0 ' <launch:check xmlns:launch="urn:ietf:params:xml:ns:launch-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:launch-1.0 launch-1.0.xsd" type="claims">
213 <launch:phase>claims</launch:phase>
214 </launch:check>
215 ';
216  
217 0 return $self->SUPER::check_domains( $params );
218 }
219  
220  
221 # Compile trade, premium and tlds extension
222  
223 sub _keysys_domain_ext {
224 0 ▶ my ( $params ) = @_;
Subroutine _keysys_domain_ext: not called CC=9 SCAR=45.0
225  
226 0 foreach my $f ( keys %$params ) {
227 0 ▶ if ( $f =~ /^x-/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($f =~ /^x-/) 0 0 0
228 0 $params->{ uc($f) } = delete $params->{$f};
229 }
230 }
231  
232 0 ▶ unless ( $params->{tld} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($params->{"tld"}) 0 0 0
233 0 ( $params->{tld} ) = $params->{dname} =~ /\.([0-9A-Za-z\-]+)$/;
234 }
235  
236 0 my $tld = uc $params->{tld};
237  
238 0 my %ext;
239  
240 # for epp need lc
241 0 foreach my $f ( keys %$params ) {
242 0 ▶ if ( $f =~ /^X-$tld-$/ or $f eq 'X-ACCEPT-PREMIUMPRICE' or $f eq 'X-ACCEPT-TRADE' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($f =~ /^X-$tld-$/ or $f eq "X-ACCEPT-PREMIUMPRICE" or $f eq "X-ACCEPT-TRADE") 0 0 0
Condition0%0/6
$f =~ /^X-$tld-$/ or $f eq "X-ACCEPT-PREMIUMPRICE" or $f eq "X-ACCEPT-TRADE"
l!l&&r!l&&!r
000
$f =~ /^X-$tld-$/ or $f eq "X-ACCEPT-PREMIUMPRICE"
l!l&&r!l&&!r
000
MC/DC0%0/3
$f =~ /^X-$tld-$/ or $f eq "X-ACCEPT-PREMIUMPRICE" or $f eq "X-ACCEPT-TRADE"
$f =~ /^X-$tld-$/ $f eq "X-ACCEPT-PREMIUMPRICE" $f eq "X-ACCEPT-TRADE"
Truth table0%0/4
A or B or C
A= $f =~ /^X-$tld-$/B= $f eq "X-ACCEPT-PREMIUMPRICE"C= $f eq "X-ACCEPT-TRADE"
ABCresult
1XX1
01X1
0011
0000
243 0 $ext{ lc($f) } = delete $params->{$f};
244 }
245 }
246  
247 0 my $extension = '';
248 # the extension fields must be arranged in alphabetical order
249 0 foreach my $f ( sort keys %ext ) {
250 0 my $f1 = $f;
251 0 $f1 =~ s/^x-//;
252 0 $extension .= " <keysys:$f1>$ext{$f}</keysys:$f1>\n";
253 }
254  
255 0 return $extension;
256 }
257  
258 =head2 create_domain
259  
260 additional keys of params:
261  
262 C<is_premium> -- register a premium domain without specifying the price, but it must be allowed in the panel;
263  
264 C<premium_price>, C<fee-fee> -- price for premium domain;
265  
266 C<premium_currency> -- currency for price for premium domain;
267  
268 C<claims> -- subhash for claims parameters:
269 C<noticeID>, C<notAfter>, C<acceptedDate>.
270 For details see L<https://tools.ietf.org/html/draft-tan-epp-launchphase-12>;
271  
272 The other parameters are zone-specific and are set as specified in The RRPProxy documentation: C<X-TLD-PARAMETER>.
273  
274 =cut
275  
276 sub create_domain {
277 0 ▶ my ( $self, $params ) = @_;
Subroutine create_domain: not called CC=10 SCAR=47.0
Pod documented
278  
279 0 $params->{authinfo} = ''; # need empty
280  
281 # Set as RRPProxy documentation, but not epp extension documentation
282 0 ▶ $params->{'X-ACCEPT-PREMIUMPRICE'} = 1 if delete $params->{is_premium}; # https://wiki.rrpproxy.net/domains/premium-domains
Branch: 1 branch
BranchTrueFalseTotal
if delete $params->{"is_premium"} 0 0 0
283 0 ▶ $params->{'X-FEE-AMOUNT'} = delete $params->{premium_price} if defined $params->{premium_price}; # zero is correct price
Branch: 1 branch
BranchTrueFalseTotal
if defined $params->{"premium_price"} 0 0 0
284 0 ▶ $params->{'X-FEE-AMOUNT'} = delete $params->{'fee-fee'} if defined $params->{'fee-fee'};
Branch: 1 branch
BranchTrueFalseTotal
if defined $params->{"fee-fee"} 0 0 0
285 0 ▶ $params->{'X-FEE-CURRENCY'} = delete $params->{premium_currency} if $params->{premium_currency};
Branch: 1 branch
BranchTrueFalseTotal
if $params->{"premium_currency"} 0 0 0
286  
287 0 my $extension = _keysys_domain_ext( $params );
288  
289 # closing special domain extensions
290 0 ▶ if ( $extension ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($extension) 0 0 0
291 0 $extension =
292 qq| <keysys:create $ks_ext>
293 <keysys:domain>$extension
294 </keysys:domain>
295 </keysys:create>
296 |;
297 }
298  
299  
300 0 ▶ if ( defined $params->{'X-FEE-AMOUNT'} ) { # https://wiki.rrpproxy.net/domains/premium-domains/x-fee-parameters
Branch: 1 branch
BranchTrueFalseTotal
if (defined $params->{"X-FEE-AMOUNT"}) 0 0 0
301 # price can be zero
302 0 $extension .= qq| <fee:create xmlns:fee="urn:ietf:params:xml:ns:fee-0.7">\n|;
303  
304 0 ▶ if ( $params->{'X-FEE-CURRENCY'} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($params->{"X-FEE-CURRENCY"}) 0 0 0
305 0 $extension .= ' <fee:currency>' . $params->{'X-FEE-CURRENCY'} . "</fee:currency>\n";
306 }
307  
308 0 $extension .= ' <fee:fee>' . $params->{'X-FEE-AMOUNT'} . "</fee:fee>\n </fee:create>\n";
309 }
310  
311  
312 0 ▶ if ( $params->{claims} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($params->{"claims"}) 0 0 0
313 $extension .=
314 ' <launch:create xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
315 <launch:phase>claims</launch:phase>
316 <launch:notice>
317 <launch:noticeID>'. $params->{claims}{noticeID} .'</launch:noticeID>
318 <launch:notAfter>'. $params->{claims}{notAfter} .'</launch:notAfter>
319 0 <launch:acceptedDate>'.$params->{claims}{acceptedDate}.'</launch:acceptedDate>
320 </launch:notice>
321 </launch:create>
322 ';
323 }
324  
325 0 ▶ $params->{extension} = $extension if $extension;
Branch: 1 branch
BranchTrueFalseTotal
if $extension 0 0 0
326  
327 0 return $self->SUPER::create_domain( $params );
328 }
329  
330  
331 =head2 transfer
332  
333 INPUT
334  
335 For premium domains, you need to pass a special parameter is_premium
336  
337 You can also specify contact id for some tlds: C<reg_id>, C<admin_id>, C<tech_id>, C<billing_id>
338  
339 All other parameters such as L<IO::EPP::Base/transfer>.
340  
341 =cut
342  
343 sub transfer {
344 0 ▶ my ( $self, $params ) = @_;
Subroutine transfer: not called CC=12 SCAR=50.5
Pod documented
345  
346 0 ▶ if ( defined $params->{authinfo} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $params->{"authinfo"}) 0 0 0
347 0 $params->{authinfo} =~ s/&/&amp;/g;
348 0 $params->{authinfo} =~ s/</&lt;/g;
349 0 $params->{authinfo} =~ s/>/&gt;/g;
350 }
351  
352 0 my $extension = '';
353  
354 0 ▶ if ( $params->{is_premium} || $params->{'X-ACCEPT-PREMIUMPRICE'} || $params->{'x-accept-premiumprice'} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($params->{"is_premium"} or $params->{"X-ACCEPT-PREMIUMPRICE"} or $params->{"x-accept-premiumprice"}) 0 0 0
Condition0%0/6
$params->{"is_premium"} or $params->{"X-ACCEPT-PREMIUMPRICE"} or $params->{"x-accept-premiumprice"}
l!l&&r!l&&!r
000
$params->{"is_premium"} or $params->{"X-ACCEPT-PREMIUMPRICE"}
l!l&&r!l&&!r
000
MC/DC0%0/3
$params->{"is_premium"} or $params->{"X-ACCEPT-PREMIUMPRICE"} or $params->{"x-accept-premiumprice"}
$params->{"is_premium"} $params->{"X-ACCEPT-PREMIUMPRICE"} $params->{"x-accept-premiumprice"}
Truth table0%0/4
A or B or C
A= $params->{"is_premium"}B= $params->{"X-ACCEPT-PREMIUMPRICE"}C= $params->{"x-accept-premiumprice"}
ABCresult
1XX1
01X1
0011
0000
355 0 $extension .= " <keysys:accept-premiumprice>1</keysys:accept-premiumprice>\n";
356 }
357  
358 0 ▶ if ( $params->{reg_id} || $params->{admin_id} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($params->{"reg_id"} or $params->{"admin_id"}) 0 0 0
Condition0%0/3
$params->{"reg_id"} or $params->{"admin_id"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$params->{"reg_id"} or $params->{"admin_id"}
$params->{"reg_id"} $params->{"admin_id"}
Truth table0%0/3
A or B
A= $params->{"reg_id"}B= $params->{"admin_id"}
ABresult
1X1
011
000
359 0 ▶ $extension .= " <keysys:ownercontact0>$$params{reg_id}</keysys:ownercontact0>\n" if $params->{reg_id};
Branch: 1 branch
BranchTrueFalseTotal
if $params->{"reg_id"} 0 0 0
360 0 ▶ $extension .= " <keysys:admincontact0>$$params{admin_id}</keysys:admincontact0>\n" if $params->{admin_id};
Branch: 1 branch
BranchTrueFalseTotal
if $params->{"admin_id"} 0 0 0
361 0 ▶ $extension .= " <keysys:techcontact0>$$params{tech_id}</keysys:techcontact0>\n" if $params->{tech_id};
Branch: 1 branch
BranchTrueFalseTotal
if $params->{"tech_id"} 0 0 0
362 0 ▶ $extension .= " <keysys:billingcontact0>$$params{billing_id}</keysys:billingcontact0>\n" if $params->{billing_id};
Branch: 1 branch
BranchTrueFalseTotal
if $params->{"billing_id"} 0 0 0
363 }
364  
365 0 ▶ if ( $extension ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($extension) 0 0 0
366 $params->{extension} =
367 0 qq| <keysys:transfer $ks_ext>
368 <keysys:domain>
369 $extension </keysys:domain>
370 </keysys:transfer>
371 |;
372 }
373  
374 0 return $self->SUPER::transfer( $params );
375 }
376  
377 =head2 renew_domain
378  
379 For renewal of the premium domain name, you need to pass a parameter C<is_premium> or C<X-ACCEPT-PREMIUMPRICE>
380  
381 =cut
382  
383 sub renew_domain {
384 0 ▶ my ( $self, $params ) = @_;
Subroutine renew_domain: not called CC=4 SCAR=30.0
Pod documented
385  
386 0 ▶ if ( $params->{is_premium} || $params->{'X-ACCEPT-PREMIUMPRICE'} || $params->{'x-accept-premiumprice'} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($params->{"is_premium"} or $params->{"X-ACCEPT-PREMIUMPRICE"} or $params->{"x-accept-premiumprice"}) 0 0 0
Condition0%0/6
$params->{"is_premium"} or $params->{"X-ACCEPT-PREMIUMPRICE"} or $params->{"x-accept-premiumprice"}
l!l&&r!l&&!r
000
$params->{"is_premium"} or $params->{"X-ACCEPT-PREMIUMPRICE"}
l!l&&r!l&&!r
000
MC/DC0%0/3
$params->{"is_premium"} or $params->{"X-ACCEPT-PREMIUMPRICE"} or $params->{"x-accept-premiumprice"}
$params->{"is_premium"} $params->{"X-ACCEPT-PREMIUMPRICE"} $params->{"x-accept-premiumprice"}
Truth table0%0/4
A or B or C
A= $params->{"is_premium"}B= $params->{"X-ACCEPT-PREMIUMPRICE"}C= $params->{"x-accept-premiumprice"}
ABCresult
1XX1
01X1
0011
0000
387 # https://wiki.rrpproxy.net/domains/premium-domains
388 $params->{extension} =
389 0 qq| <keysys:renew $ks_ext>
390 <keysys:domain>
391 <keysys:accept-premiumprice>1</keysys:accept-premiumprice>
392 </keysys:domain>
393 </keysys:renew>
394 |;
395 }
396  
397 0 return $self->SUPER::renew_domain( $params );
398 }
399  
400  
401 =head2 update_domain
402  
403 C<trade> – option for special change of domain owner – paid or requires confirmation;
404  
405 =cut
406  
407 sub update_domain {
408 0 ▶ my ( $self, $params ) = @_;
Subroutine update_domain: not called CC=3 SCAR=24.8
Pod documented
409  
410 0 ▶ $params->{'X-ACCEPT-TRADE'} = 1 if delete $params->{trade};
Branch: 1 branch
BranchTrueFalseTotal
if delete $params->{"trade"} 0 0 0
411  
412 0 my $extension = _keysys_domain_ext( $params );
413  
414 0 ▶ if ( $extension ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($extension) 0 0 0
415 $params->{extension} =
416 0 qq| <keysys:update $ks_ext>
417 <keysys:domain>$extension
418 </keysys:domain>
419 </keysys:update>
420 |;
421 }
422  
423 0 return $self->SUPER::update_domain( $params );
424 }
425  
426  
427 =head2 set_domain_renewal_mode
428  
429 Set renewal mode for domain.
430  
431 INPUT:
432  
433 params with key:
434  
435 C<renewal_mode> – valid values: C<DEFAULT>, C<RENEWONCE>, C<AUTORENEW>, C<AUTOEXPIRE>, C<AUTODELETE>
436  
437 For details see L<https://wiki.rrpproxy.net/domains/renewal-system>
438  
439 OUTPUT:
440 see L<IO::EPP::Base/simple_request>
441  
442 =cut
443  
444 sub set_domain_renewal_mode {
445 0 ▶ my ( $self, $params ) = @_;
Subroutine set_domain_renewal_mode: not called CC=1 SCAR=6.9
Pod documented
446  
447 0 $params->{renewal_mode} = uc $params->{renewal_mode};
448  
449 $params->{extension} =
450 0 qq| <keysys:update $ks_ext>
451 <keysys:domain>
452 <keysys:renewalmode>$$params{renewal_mode}</keysys:renewalmode>
453 </keysys:domain>
454 </keysys:update>
455 |;
456  
457 0 return $self->update_domain( $params );
458 }
459  
460  
461 =head2 req_poll_ext
462  
463 keysys extension for the req poll
464  
465 =cut
466  
467 sub req_poll_ext {
468 0 ▶ my ( undef, $ext ) = @_;
Subroutine req_poll_ext: not called CC=7 SCAR=40.3
Pod documented
469  
470 0 my %info;
471  
472 0 ▶ if ( $ext =~ /<keysys:poll[^<>]+>(.+?)<\/keysys:poll>/s ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ext =~ m[<keysys:poll[^<>]+>(.+?)</keysys:poll>]s) 0 0 0
473 0 my $key_ext = $1;
474  
475 0 foreach my $type ( 'data', 'info' ) {
476 0 ▶ if ( $key_ext =~ /<keysys:$type>(.+?)<\/keysys:$type>/s ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($key_ext =~ m[<keysys:$type>(.+?)</keysys:$type>]s) 0 0 0
477 0 my $data = $1;
478  
479 0 my @data = $data =~ /<[^<>]+>[^<>]+<\/[^<>]+>/g;
480  
481 0 ▶ if ( scalar @data ) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @data) { } 0 0 0
482 0 foreach my $row ( @data ) {
483 0 ▶ if ( $row =~ /<([^<>]+)>([^<>]+)<\/[^<>]+>/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($row =~ m[<([^<>]+)>([^<>]+)</[^<>]+>]) 0 0 0
484 0 $info{$1} = $2;
485 }
486 }
487 }
488 else {
489 0 $info{$type} = $data;
490 }
491 }
492 }
493 }
494  
495 0 return \%info;
496 }
497  
498  
499 1 1;
500  
501 __END__
« EPP/Test/Base.pm ↑ Summary EPP/Test/VerisignCore.pm »