| 1 | package API::MailboxOrg::API::Utils; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: MailboxOrg::API::Utils | ||||||||||
| 4 | |||||||||||
| 5 | # --- | ||||||||||
| 6 | # This class is auto-generated by bin/get_mailbox_api.pl | ||||||||||
| 7 | # --- | ||||||||||
| 8 | |||||||||||
| 9 | 2 | ▶ | use v5.24; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 2 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 2 | ▶ | use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 2 | ▶ | use API::MailboxOrg::Types qw(HashRefRestricted Boolean); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 2 | ▶ | use Params::ValidationCompiler qw(validation_for); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | |||||||||||
| 19 | 2 | extends 'API::MailboxOrg::APIBase'; | |||||||||
| 20 | |||||||||||
| 21 | 2 | with 'MooX::Singleton'; | |||||||||
| 22 | |||||||||||
| 23 | 2 | ▶ | use feature 'signatures'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | 2 | ▶ | no warnings 'experimental::signatures'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | |||||||||||
| 26 | 2 | our $VERSION = '1.0.2'; # VERSION | |||||||||
| 27 | |||||||||||
| 28 | 2 | my %validators = ( | |||||||||
| 29 | 'validator' => validation_for( | ||||||||||
| 30 | params => { | ||||||||||
| 31 | value => { type => Str, optional => 0 }, | ||||||||||
| 32 | type => { type => Enum[qw(hostname domain mailhost mail account pass pass2 memo user contextid name)], optional => 0 }, | ||||||||||
| 33 | |||||||||||
| 34 | }, | ||||||||||
| 35 | ), | ||||||||||
| 36 | |||||||||||
| 37 | ); | ||||||||||
| 38 | |||||||||||
| 39 | |||||||||||
| 40 | 0 | ▶ | sub validator ($self, %params) { | ||||||||
|
Subroutine
validator: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 41 | 0 | my $validator = $validators{'validator'}; | |||||||||
| 42 | 0 | ▶ | %params = $validator->(%params) if $validator; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 43 | |||||||||||
| 44 | 0 | my %opt = (); | |||||||||
| 45 | |||||||||||
| 46 | 0 | return $self->_request( 'utils.validator', \%params, \%opt ); | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | |||||||||||
| 50 | 2 | 1; | |||||||||
| 51 | |||||||||||
| 52 | __END__ | ||||||||||