line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
=encoding utf-8 |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Webservice::OVH::Email |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 SYNOPSIS |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use Webservice::OVH; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $ovh = Webservice::OVH->new_from_json("credentials.json"); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $email_domains = $ovh->email->domains->domains; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
foreach my $email_domain (@$email_domains) { |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
print $email_domain->name; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Module that support limited access to email methods of the ovh api |
24
|
|
|
|
|
|
|
The methods that are supported are marked as deprecated by ovh. |
25
|
|
|
|
|
|
|
But unitl now they didn't produce a alternative. |
26
|
|
|
|
|
|
|
For now the MX order Methods are functional. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 METHODS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
use strict; |
33
|
36
|
|
|
36
|
|
258
|
use warnings; |
|
36
|
|
|
|
|
74
|
|
|
36
|
|
|
|
|
932
|
|
34
|
36
|
|
|
36
|
|
158
|
use Carp qw{ carp croak }; |
|
36
|
|
|
|
|
68
|
|
|
36
|
|
|
|
|
844
|
|
35
|
36
|
|
|
36
|
|
164
|
|
|
36
|
|
|
|
|
64
|
|
|
36
|
|
|
|
|
1859
|
|
36
|
|
|
|
|
|
|
our $VERSION = 0.47; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
use Webservice::OVH::Email::Domain; |
39
|
36
|
|
|
36
|
|
13587
|
|
|
36
|
|
|
|
|
111
|
|
|
36
|
|
|
|
|
4326
|
|
40
|
|
|
|
|
|
|
=head2 _new |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Internal Method to create the email object. |
43
|
|
|
|
|
|
|
This method is not ment to be called external. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=over |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=item * Parameter: $api_wrapper - ovh api wrapper object, $module - root object |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item * Return: L<Webservice::OVH::Email> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item * Synopsis: Webservice::OVH::Email->_new($ovh_api_wrapper, $self); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=back |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my ( $class, %params ) = @_; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
0
|
|
|
die "Missing module" unless $params{module}; |
61
|
|
|
|
|
|
|
die "Missing wrapper" unless $params{wrapper}; |
62
|
0
|
0
|
|
|
|
|
my $module = $params{module}; |
63
|
0
|
0
|
|
|
|
|
my $api_wrapper = $params{wrapper}; |
64
|
0
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
my $self = bless { module => $module, _api_wrapper => $api_wrapper }, $class; |
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
$self->{_domain} = Webservice::OVH::Email::Domain->_new( wrapper => $api_wrapper, module => $module ); |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
return $self; |
70
|
|
|
|
|
|
|
} |
71
|
0
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 domain |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Gives Acces to the /email/domain/ methods of the ovh api |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * Return: L<Webservice::OVH::Email::Domain> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * Synopsis: $ovh->order->email |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=back |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
my ($self) = @_; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
return $self->{_domain}; |
90
|
0
|
|
|
0
|
1
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
1; |