| 1 | ## Domain Registry Interface, Gandi Web Services Account commands | ||||||||||
| 2 | ## | ||||||||||
| 3 | ## Copyright (c) 2008,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::Gandi::WS::Account; | ||||||||||
| 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 | |||||||||||
| 22 | =pod | ||||||||||
| 23 | |||||||||||
| 24 | =head1 NAME | ||||||||||
| 25 | |||||||||||
| 26 | Net::DRI::Protocol::Gandi::WS::Account - Gandi Web Services Account commands for Net::DRI | ||||||||||
| 27 | |||||||||||
| 28 | =head1 DESCRIPTION | ||||||||||
| 29 | |||||||||||
| 30 | Please see the README file for details. | ||||||||||
| 31 | |||||||||||
| 32 | =head1 SUPPORT | ||||||||||
| 33 | |||||||||||
| 34 | For now, support questions should be sent to: | ||||||||||
| 35 | |||||||||||
| 36 | E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 37 | |||||||||||
| 38 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 39 | |||||||||||
| 40 | =head1 SEE ALSO | ||||||||||
| 41 | |||||||||||
| 42 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||
| 43 | |||||||||||
| 44 | =head1 AUTHOR | ||||||||||
| 45 | |||||||||||
| 46 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 47 | |||||||||||
| 48 | =head1 COPYRIGHT | ||||||||||
| 49 | |||||||||||
| 50 | Copyright (c) 2008,2013 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||
| 51 | All rights reserved. | ||||||||||
| 52 | |||||||||||
| 53 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 54 | it under the terms of the GNU General Public License as published by | ||||||||||
| 55 | the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 56 | (at your option) any later version. | ||||||||||
| 57 | |||||||||||
| 58 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 59 | |||||||||||
| 60 | =cut | ||||||||||
| 61 | |||||||||||
| 62 | #################################################################################################### | ||||||||||
| 63 | |||||||||||
| 64 | sub register_commands | ||||||||||
| 65 | { | ||||||||||
| 66 | 0 | ▶ | my ($class,$version)=@_; | ||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 67 | 0 | my %tmp=( | |||||||||
| 68 | list_domains => [\&list_domains, \&list_domains_parse ], | ||||||||||
| 69 | ); | ||||||||||
| 70 | |||||||||||
| 71 | 0 | return { 'account' => \%tmp }; | |||||||||
| 72 | } | ||||||||||
| 73 | |||||||||||
| 74 | sub list_domains | ||||||||||
| 75 | { | ||||||||||
| 76 | 0 | ▶ | my ($po)=@_; | ||||||||
|
Subroutine
list_domains: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 77 | 0 | my $msg=$po->message(); | |||||||||
| 78 | 0 | $msg->method('domain_list'); | |||||||||
| 79 | 0 | return; | |||||||||
| 80 | } | ||||||||||
| 81 | |||||||||||
| 82 | sub list_domains_parse | ||||||||||
| 83 | { | ||||||||||
| 84 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||
|
Subroutine
list_domains_parse: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 85 | 0 | my $mes=$po->message(); | |||||||||
| 86 | 0 | ▶ | return unless $mes->is_success(); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 87 | |||||||||||
| 88 | 0 | my $r=$mes->result(); | |||||||||
| 89 | 0 | ▶ | Net::DRI::Exception->die(1,'protocol/gandi/ws',1,'Unexpected reply for domainList: '.$r) unless (ref($r) eq 'ARRAY'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 90 | 0 | my @r=@$r; | |||||||||
| 91 | 0 | $rinfo->{account}->{domains}->{action}='list'; | |||||||||
| 92 | 0 | $rinfo->{account}->{domains}->{list}=\@r; | |||||||||
| 93 | 0 | return; | |||||||||
| 94 | } | ||||||||||
| 95 | |||||||||||
| 96 | #################################################################################################### | ||||||||||
| 97 | 1 | 1; | |||||||||