DRI/Protocol/EPP/Extensions/AFNIC/Session.pm

filter: Statementstmt 59.0% 13 / 22 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 2 totaltotal 45.9% 17 / 37 CC 3 SCAR 16.6
CC
3
Cov
48%
parse_greeting
12.0
register_commands
2.0
BEGIN
1.0
CRAP 5.2
« DRI/Protocol/Gandi/WS/Connection.pm ↑ Summary DRI/Protocol/IRIS/DCHK/Status.pm »
1 ## Domain Registry Interface, AFNIC EPP Session commands
2 ##
3 ## Copyright (c) 2011,2012 Patrick Mevzek <netdri@dotandco.com>. All rights reserved.
4 ##
5 ## This file is part of Net::DRI
6 ##
7 ## Net::DRI is free software; you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation; either version 2 of the License, or
10 ## (at your option) any later version.
11 ##
12 ## See the LICENSE file that comes with this distribution for more details.
13 #########################################################################################
14  
15 package Net::DRI::Protocol::EPP::Extensions::AFNIC::Session;
16  
17 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 1 ▶use Net::DRI::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 1 ▶use Net::DRI::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 =pod
24  
25 =head1 NAME
26  
27 Net::DRI::Protocol::EPP::Extensions::AFNIC::Session - AFNIC (.FR/.RE/.TF/.WF/.PM/.YT) EPP Session commands for Net::DRI
28  
29 =head1 DESCRIPTION
30  
31 Please see the README file for details.
32  
33 =head1 SUPPORT
34  
35 For now, support questions should be sent to:
36  
37 E<lt>netdri@dotandco.comE<gt>
38  
39 Please also see the SUPPORT file in the distribution.
40  
41 =head1 SEE ALSO
42  
43 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
44  
45 =head1 AUTHOR
46  
47 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
48  
49 =head1 COPYRIGHT
50  
51 Copyright (c) 2011,2012 Patrick Mevzek <netdri@dotandco.com>.
52 All rights reserved.
53  
54 This program is free software; you can redistribute it and/or modify
55 it under the terms of the GNU General Public License as published by
56 the Free Software Foundation; either version 2 of the License, or
57 (at your option) any later version.
58  
59 See the LICENSE file that comes with this distribution for more details.
60  
61 =cut
62  
63 ####################################################################################################
64  
65 sub register_commands
66 {
67 0 ▶ my ($class,$version)=@_;
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
68 0 my %tmp=(
69 'connect' => [ undef, \&parse_greeting ],
70 noop => [ undef, \&parse_greeting ], ## for keepalives
71 );
72  
73 0 return { 'session' => \%tmp };
74 }
75  
76 sub parse_greeting
77 {
78 0 ▶ my ($po,$otype,$oaction,$oname,$rinfo)=@_;
Subroutine parse_greeting: not called CC=3 SCAR=24.8
Pod undocumented
79 0 my $mes=$po->message();
80 0 my $g=$mes->node_greeting();
81 0 ▶ return unless $mes->is_success() && defined $g; ## make sure we are not called for all parsing operations (after poll), just after true greeting
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success and defined $g 0 0 0
Condition0%0/3
$mes->is_success and defined $g
!ll&&!rl&&r
000
MC/DC0%0/2
$mes->is_success and defined $g
$mes->is_success defined $g
Truth table0%0/3
A and B
A= $mes->is_successB= defined $g
ABresult
0X0
100
111
82  
83 0 $po->switch_to_highest_namespace_version('frnic');
84 0 return;
85 }
86  
87 ####################################################################################################
88 1 1;
« DRI/Protocol/Gandi/WS/Connection.pm ↑ Summary DRI/Protocol/IRIS/DCHK/Status.pm »