| 1 | package Params::Validate::XS; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 34 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 34 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | |||||||||||||||
| 6 | 34 | our $VERSION = '1.30'; | |||||||||||||
| 7 | |||||||||||||||
| 8 | 34 | ▶ | use Carp; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 9 | |||||||||||||||
| 10 | my $default_fail = sub { | ||||||||||||||
| 11 | 10 | ▶ | Carp::confess( $_[0] ); | ||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||
| 12 | 34 | }; | |||||||||||||
| 13 | |||||||||||||||
| 14 | { | ||||||||||||||
| 15 | 34 | my %defaults = ( | |||||||||||||
| 16 | ignore_case => 0, | ||||||||||||||
| 17 | strip_leading => 0, | ||||||||||||||
| 18 | allow_extra => 0, | ||||||||||||||
| 19 | on_fail => $default_fail, | ||||||||||||||
| 20 | stack_skip => 1, | ||||||||||||||
| 21 | normalize_keys => undef, | ||||||||||||||
| 22 | ); | ||||||||||||||
| 23 | |||||||||||||||
| 24 | 34 | *set_options = \&validation_options; | |||||||||||||
| 25 | |||||||||||||||
| 26 | sub validation_options { | ||||||||||||||
| 27 | 40 | ▶ | my %opts = @_; | ||||||||||||
|
Subroutine
validation_options: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||
| 28 | |||||||||||||||
| 29 | 40 | my $caller = caller; | |||||||||||||
| 30 | |||||||||||||||
| 31 | 40 | foreach ( keys %defaults ) { | |||||||||||||
| 32 | 240 | ▶ | $opts{$_} = $defaults{$_} unless exists $opts{$_}; | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 33 | } | ||||||||||||||
| 34 | |||||||||||||||
| 35 | 40 | $Params::Validate::OPTIONS{$caller} = \%opts; | |||||||||||||
| 36 | } | ||||||||||||||
| 37 | |||||||||||||||
| 38 | 34 | ▶ | use XSLoader; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 39 | XSLoader::load( | ||||||||||||||
| 40 | __PACKAGE__, | ||||||||||||||
| 41 | exists $Params::Validate::XS::{VERSION} | ||||||||||||||
| 42 | 34 | ▶ | ? ${ $Params::Validate::XS::{VERSION} } | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 43 | : (), | ||||||||||||||
| 44 | ); | ||||||||||||||
| 45 | } | ||||||||||||||
| 46 | |||||||||||||||
| 47 | sub _check_regex_from_xs { | ||||||||||||||
| 48 | 9 | ▶ | return ( defined $_[0] ? $_[0] : '' ) =~ /$_[1]/ ? 1 : 0; | ||||||||||||
|
Subroutine
_check_regex_from_xs: called CC=3 SCAR=11.0
Branch: 2 branches
| |||||||||||||||
| 49 | } | ||||||||||||||
| 50 | |||||||||||||||
| 51 | 34 | 1; | |||||||||||||