DRI/Protocol/OVH/WS/Connection.pm

filter: Statementstmt 25.9% 7 / 27 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 2 / 8 Podpod 0.0% 0 / 6 totaltotal 18.3% 9 / 49 CC 5 SCAR 19.2
CC
5
Cov
20%
parse_login
12.0
parse_logout
12.0
login
2.0
CRAP 6.8
« DRI/Protocol/RRP/Message.pm ↑ Summary DRI/Data/Raw.pm »
1 ## Domain Registry Interface, OVH Web Services Connection handling
2 ##
3 ## Copyright (c) 2008,2009,2013 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::OVH::WS::Connection;
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 =pod
21  
22 =head1 NAME
23  
24 Net::DRI::Protocol::OVH::WS::Connection - OVH Web Services Connection handling for Net::DRI
25  
26 =head1 DESCRIPTION
27  
28 Please see the README file for details.
29  
30 =head1 SUPPORT
31  
32 For now, support questions should be sent to:
33  
34 E<lt>netdri@dotandco.comE<gt>
35  
36 Please also see the SUPPORT file in the distribution.
37  
38 =head1 SEE ALSO
39  
40 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
41  
42 =head1 AUTHOR
43  
44 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
45  
46 =head1 COPYRIGHT
47  
48 Copyright (c) 2008,2009 Patrick Mevzek <netdri@dotandco.com>.
49 All rights reserved.
50  
51 This program is free software; you can redistribute it and/or modify
52 it under the terms of the GNU General Public License as published by
53 the Free Software Foundation; either version 2 of the License, or
54 (at your option) any later version.
55  
56 See the LICENSE file that comes with this distribution for more details.
57  
58 =cut
59  
60 ####################################################################################################
61  
62 sub login
63 0 ▶{
Subroutine login: not called CC=1 SCAR=6.9
Pod undocumented
64 0 my ($class,$cm,$id,$pass,$cltrid)=@_;
65 0 my $mes=$cm->();
66 0 $mes->method('login');
67 0 $mes->params([$id,$pass,'fr',0]);
68 0 return $mes;
69 }
70  
71 sub parse_login
72 0 ▶{
Subroutine parse_login: not called CC=3 SCAR=24.8
Pod undocumented
73 0 my ($class,$mes)=@_;
74 0 ▶ $mes->errmsg($mes->is_success()? 'Login OK' : 'Login failed') unless $mes->errmsg();
Branch: 2 branches
BranchTrueFalseTotal
unless $mes->errmsg 0 0 0
$mes->is_success ? : 0 0 0
75 0 return $mes->result_status();
76 }
77  
78 sub extract_session
79 0 ▶{
Subroutine extract_session: not called CC=1 SCAR=6.9
Pod undocumented
80 0 my ($class,$mes)=@_;
81 0 return { id => $mes->result() };
82 }
83  
84 ####################################################################################################
85  
86 sub logout
87 0 ▶{
Subroutine logout: not called CC=1 SCAR=6.9
Pod undocumented
88 0 my ($class,$cm,$cltrid,$sd)=@_;
89 0 my $mes=$cm->();
90 0 $mes->method('logout');
91 0 $mes->params([$sd->{id}]);
92 0 return $mes;
93 }
94  
95 sub parse_logout
96 0 ▶{
Subroutine parse_logout: not called CC=3 SCAR=24.8
Pod undocumented
97 0 my ($class,$mes)=@_;
98 0 ▶ $mes->errmsg($mes->is_success()? 'Logout OK' : 'Logout failed') unless $mes->errmsg();
Branch: 2 branches
BranchTrueFalseTotal
unless $mes->errmsg 0 0 0
$mes->is_success ? : 0 0 0
99 0 return $mes->result_status();
100 }
101  
102 sub transport_default
103 0 ▶{
Subroutine transport_default: not called CC=1 SCAR=6.9
Pod undocumented
104 0 my ($self,$tname)=@_;
105 0 return (defer => 1, has_login => 1, has_logout => 1);
106 }
107  
108 ####################################################################################################
109 1 1;
« DRI/Protocol/RRP/Message.pm ↑ Summary DRI/Data/Raw.pm »