line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## Domain Registry Interface, .CH/.LI policies |
2
|
|
|
|
|
|
|
## |
3
|
|
|
|
|
|
|
## Copyright (c) 2008,2009 Tonnerre Lombard . All rights reserved. |
4
|
|
|
|
|
|
|
## (c) 2011 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::DRD::SWITCH; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
1034
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
42
|
|
19
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
39
|
|
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
5
|
use base qw/Net::DRI::DRD/; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
516
|
|
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
2
|
|
9
|
use DateTime::Duration; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
325
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__PACKAGE__->make_exception_for_unavailable_operations(qw/domain_transfer_accept domain_transfer_refuse domain_renew contact_transfer_stop contact_transfer_query contact_transfer_accept contact_transfer_refuse/); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=pod |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Net::DRI::DRD::SWITCH - SWITCH (.CH/.LI) policies 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
|
|
|
|
|
|
|
Etonnerre.lombard@sygroup.chE |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Please also see the SUPPORT file in the distribution. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 SEE ALSO |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Ehttp://www.dotandco.com/services/software/Net-DRI/E |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 AUTHOR |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Tonnerre Lombard, Etonnerre.lombard@sygroup.chE |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 COPYRIGHT |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Copyright (c) 2008,2009 Tonnerre Lombard . |
56
|
|
|
|
|
|
|
(c) 2011 Patrick Mevzek . All rights reserved. |
57
|
|
|
|
|
|
|
All rights reserved. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
60
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
61
|
|
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or |
62
|
|
|
|
|
|
|
(at your option) any later version. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
See the LICENSE file that comes with this distribution for more details. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
#################################################################################################### |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub new |
71
|
|
|
|
|
|
|
{ |
72
|
1
|
|
|
1
|
0
|
2
|
my $class=shift; |
73
|
1
|
|
|
|
|
5
|
my $self=$class->SUPER::new(@_); |
74
|
1
|
|
|
|
|
5
|
$self->{info}->{host_as_attr}=0; |
75
|
1
|
|
|
|
|
1
|
$self->{info}->{contact_i18n}=1; ## LOC only |
76
|
1
|
|
|
|
|
2
|
return $self; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
0
|
|
|
0
|
1
|
0
|
sub periods { return map { DateTime::Duration->new(years => $_) } (1); } |
|
0
|
|
|
|
|
0
|
|
80
|
1
|
|
|
1
|
1
|
2
|
sub name { return 'SWITCH'; } |
81
|
1
|
|
|
1
|
1
|
3
|
sub tlds { return ('ch','li'); } |
82
|
0
|
|
|
0
|
1
|
0
|
sub object_types { return ('domain','contact','ns'); } |
83
|
0
|
|
|
0
|
0
|
0
|
sub profile_types { return qw/epp/; } |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub transport_protocol_default |
86
|
|
|
|
|
|
|
{ |
87
|
1
|
|
|
1
|
0
|
1
|
my ($self,$type)=@_; |
88
|
|
|
|
|
|
|
|
89
|
1
|
50
|
|
|
|
4
|
return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::SWITCH',{}) if $type eq 'epp'; |
90
|
|
|
|
|
|
|
## return ('Net::DRI::Transport::Socket',{remote_host=>'whois.switch.ch'},'Net::DRI::Protocol::Whois',{}) if $type eq 'whois'; |
91
|
0
|
|
|
|
|
|
return; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
#################################################################################################### |
95
|
|
|
|
|
|
|
1; |