line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Validate |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
1044
|
|
|
2
|
|
|
|
|
7
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
39
|
|
12
|
2
|
|
|
2
|
|
8
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
45
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
63
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
15
|
2
|
|
|
2
|
|
571
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
17
|
|
16
|
2
|
|
|
2
|
|
2280
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
17
|
2
|
|
|
2
|
|
786
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
123
|
|
18
|
|
|
|
|
|
|
extends 'API::MailboxOrg::APIBase'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
with 'MooX::Singleton'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use feature 'signatures'; |
23
|
2
|
|
|
2
|
|
11
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
155
|
|
24
|
2
|
|
|
2
|
|
11
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
313
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'spf' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
domain => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
), |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $validator = $validators{'spf'}; |
39
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
my %opt = (needs_auth => 1); |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
return $self->_request( 'domain.validate.spf', \%params, \%opt ); |
44
|
|
|
|
|
|
|
} |
45
|
0
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=pod |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=encoding UTF-8 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 NAME |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
API::MailboxOrg::API::Validate - MailboxOrg::API::Validate |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 VERSION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
version 1.0.1 |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SYNOPSIS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
use API::MailboxOrg; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
my $user = '1234abc'; |
67
|
|
|
|
|
|
|
my $password = '1234abc'; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
70
|
|
|
|
|
|
|
user => $user, |
71
|
|
|
|
|
|
|
password => $password, |
72
|
|
|
|
|
|
|
); |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 METHODS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 spf |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Returns SPF details about a domain |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Available for admin, reseller, account, domain |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Parameters: |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=over 4 |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * domain |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=back |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
returns: array |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
$api->validate->spf(%params); |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 AUTHOR |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This is free software, licensed under: |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |