| 1 | ## Domain Registry Interface, AFNIC Registry Driver for .FR/.RE/.TF/.YT/.WF/.PM | ||||||||||
| 2 | ## | ||||||||||
| 3 | ## Copyright (c) 2005-2006,2008-2014,2016 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::DRD::AFNIC; | ||||||||||
| 16 | |||||||||||
| 17 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | 2 | ▶ | use base qw/Net::DRI::DRD/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | 2 | ▶ | use DateTime::Duration; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 2 | ▶ | use Net::DRI::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | |||||||||||
| 25 | 2 | __PACKAGE__->make_exception_for_unavailable_operations(qw/host_update host_current_status host_check host_exist host_delete host_create host_info contact_delete contact_check/); | |||||||||
| 26 | |||||||||||
| 27 | =pod | ||||||||||
| 28 | |||||||||||
| 29 | =head1 NAME | ||||||||||
| 30 | |||||||||||
| 31 | Net::DRI::DRD::AFNIC - AFNIC (.FR/.RE/.TF/.WF/.PM/.YT) Registry Driver for Net::DRI | ||||||||||
| 32 | |||||||||||
| 33 | =head1 DESCRIPTION | ||||||||||
| 34 | |||||||||||
| 35 | Please see the README file for details. | ||||||||||
| 36 | |||||||||||
| 37 | =head1 SUPPORT | ||||||||||
| 38 | |||||||||||
| 39 | For now, support questions should be sent to: | ||||||||||
| 40 | |||||||||||
| 41 | E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 42 | |||||||||||
| 43 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 44 | |||||||||||
| 45 | =head1 SEE ALSO | ||||||||||
| 46 | |||||||||||
| 47 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||
| 48 | |||||||||||
| 49 | =head1 AUTHOR | ||||||||||
| 50 | |||||||||||
| 51 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 52 | |||||||||||
| 53 | =head1 COPYRIGHT | ||||||||||
| 54 | |||||||||||
| 55 | Copyright (c) 2005-2006,2008-2014,2016 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||
| 56 | All rights reserved. | ||||||||||
| 57 | |||||||||||
| 58 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 59 | it under the terms of the GNU General Public License as published by | ||||||||||
| 60 | the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 61 | (at your option) any later version. | ||||||||||
| 62 | |||||||||||
| 63 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 64 | |||||||||||
| 65 | =cut | ||||||||||
| 66 | |||||||||||
| 67 | #################################################################################################### | ||||||||||
| 68 | |||||||||||
| 69 | sub new | ||||||||||
| 70 | 1 | ▶ | { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 71 | 1 | my $class=shift; | |||||||||
| 72 | 1 | my $self=$class->SUPER::new(@_); | |||||||||
| 73 | 1 | $self->{info}->{host_as_attr}=1; | |||||||||
| 74 | 1 | $self->{info}->{contact_i18n}=1; ## LOC only | |||||||||
| 75 | 1 | $self->{info}->{check_limit}=7; | |||||||||
| 76 | 1 | return $self; | |||||||||
| 77 | } | ||||||||||
| 78 | |||||||||||
| 79 | 0 | ▶ | sub periods { return map { DateTime::Duration->new(years => $_) } (1); } | ||||||||
|
Subroutine
periods: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 80 | 1 | ▶ | sub name { return 'AFNIC'; } | ||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 81 | 1 | ▶ | sub tlds { return (qw/fr re tf wf pm yt asso.fr com.fr tm.fr gouv.fr/); } ## see http://www.afnic.fr/doc/autres-nic/dom-tom | ||||||||
|
Subroutine
tlds: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 82 | 0 | ▶ | sub object_types { return ('domain','contact'); } | ||||||||
|
Subroutine
object_types: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 83 | 0 | ▶ | sub profile_types { return qw/epp dchk/; } | ||||||||
|
Subroutine
profile_types: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 84 | |||||||||||
| 85 | sub transport_protocol_default | ||||||||||
| 86 | 1 | ▶ | { | ||||||||
|
Subroutine
transport_protocol_default: called CC=3 SCAR=16.5
Pod
undocumented
| |||||||||||
| 87 | 1 | my ($self,$type)=@_; | |||||||||
| 88 | |||||||||||
| 89 | 1 | ▶ | return ('Net::DRI::Transport::Socket',{remote_host => 'epp.sandbox.nic.fr'},'Net::DRI::Protocol::EPP::Extensions::AFNIC',{}) if $type eq 'epp'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 90 | 0 | ▶ | return ('Net::DRI::Transport::Socket',{find_remote_server => ['fr.','DCHK1:iris.lwz']},'Net::DRI::Protocol::IRIS',{version=>'1.0',authority=>'fr',request_deflate=>1}) if $type eq 'dchk'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 91 | 0 | return; | |||||||||
| 92 | } | ||||||||||
| 93 | |||||||||||
| 94 | #################################################################################################### | ||||||||||
| 95 | |||||||||||
| 96 | sub domain_operation_needs_is_mine | ||||||||||
| 97 | 0 | ▶ | { | ||||||||
|
Subroutine
domain_operation_needs_is_mine: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 98 | 0 | my ($self,$ndr,$domain,$op)=@_; | |||||||||
| 99 | 0 | ▶ | return $self->SUPER::domain_operation_needs_is_mine($ndr,$domain,$op) if ($ndr->protocol()->name() eq 'EPP'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 100 | 0 | return; | |||||||||
| 101 | } | ||||||||||
| 102 | |||||||||||
| 103 | sub domain_recover_start | ||||||||||
| 104 | 0 | ▶ | { | ||||||||
|
Subroutine
domain_recover_start: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 105 | 0 | my ($self,$ndr,$domain,$rd)=@_; | |||||||||
| 106 | 0 | $self->enforce_domain_name_constraints($ndr,$domain,'recover'); | |||||||||
| 107 | 0 | return $ndr->process('domain','recover_request',[$domain,$rd]); | |||||||||
| 108 | } | ||||||||||
| 109 | |||||||||||
| 110 | #################################################################################################### | ||||||||||
| 111 | 2 | 1; | |||||||||