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