File Coverage

blib/lib/Net/DRI/Protocol/Gandi/WS.pm
Criterion Covered Total %
statement 12 28 42.8
branch n/a
condition n/a
subroutine 4 8 50.0
pod 1 2 50.0
total 17 38 44.7


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, Gandi Web Services Protocol
2             ## As seen on https://api.ote.gandi.net/
3             ##
4             ## Copyright (c) 2008-2010,2013 Patrick Mevzek . All rights reserved.
5             ##
6             ## This file is part of Net::DRI
7             ##
8             ## Net::DRI is free software; you can redistribute it and/or modify
9             ## it under the terms of the GNU General Public License as published by
10             ## the Free Software Foundation; either version 2 of the License, or
11             ## (at your option) any later version.
12             ##
13             ## See the LICENSE file that comes with this distribution for more details.
14             ####################################################################################################
15              
16             package Net::DRI::Protocol::Gandi::WS;
17              
18 1     1   776 use strict;
  1         2  
  1         27  
19 1     1   4 use warnings;
  1         1  
  1         24  
20              
21 1     1   4 use base qw(Net::DRI::Protocol);
  1         2  
  1         77  
22 1     1   485 use Net::DRI::Protocol::Gandi::WS::Message;
  1         3  
  1         5  
23              
24             =pod
25              
26             =head1 NAME
27              
28             Net::DRI::Protocol::Gandi::WS - Gandi Web Services Protocol for Net::DRI
29              
30             =head1 DESCRIPTION
31              
32             Please see the README file for details.
33              
34             =head1 SUPPORT
35              
36             For now, support questions should be sent to:
37              
38             Enetdri@dotandco.comE
39              
40             Please also see the SUPPORT file in the distribution.
41              
42             =head1 SEE ALSO
43              
44             Ehttp://www.dotandco.com/services/software/Net-DRI/E
45              
46             =head1 AUTHOR
47              
48             Patrick Mevzek, Enetdri@dotandco.comE
49              
50             =head1 COPYRIGHT
51              
52             Copyright (c) 2008-2010,2013 Patrick Mevzek .
53             All rights reserved.
54              
55             This program is free software; you can redistribute it and/or modify
56             it under the terms of the GNU General Public License as published by
57             the Free Software Foundation; either version 2 of the License, or
58             (at your option) any later version.
59              
60             See the LICENSE file that comes with this distribution for more details.
61              
62             =cut
63              
64             ####################################################################################################
65              
66             sub new
67             {
68 0     0 1   my ($c,$ctx,$rp)=@_;
69 0           my $self=$c->SUPER::new($ctx);
70 0           $self->name('gandi_ws');
71 0           $self->version('0.1');
72 0     0     $self->factories('message',sub { my $m=Net::DRI::Protocol::Gandi::WS::Message->new(); $m->version('0.1'); return $m; });
  0            
  0            
  0            
73 0           $self->_load($rp);
74 0           return $self;
75             }
76              
77             sub _load
78             {
79 0     0     my ($self,$rp)=@_;
80 0           my @class=map { 'Net::DRI::Protocol::Gandi::WS::'.$_ } (qw/Account Domain/);
  0            
81 0           return $self->SUPER::_load(@class);
82             }
83              
84             sub transport_default
85             {
86 0     0 0   my ($self)=@_;
87 0           return (protocol_connection => 'Net::DRI::Protocol::Gandi::WS::Connection', protocol_version => 1);
88             }
89              
90             ####################################################################################################
91             1;