← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:15 2021

Filename/usr/local/lib/perl5/site_perl/mach/5.32/Params/Validate/XS.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sParams::Validate::XS::::BEGIN@3Params::Validate::XS::BEGIN@3
0000s0sParams::Validate::XS::::BEGIN@38Params::Validate::XS::BEGIN@38
0000s0sParams::Validate::XS::::BEGIN@4Params::Validate::XS::BEGIN@4
0000s0sParams::Validate::XS::::BEGIN@8Params::Validate::XS::BEGIN@8
0000s0sParams::Validate::XS::::__ANON__Params::Validate::XS::__ANON__ (xsub)
0000s0sParams::Validate::XS::::__ANON__[:12]Params::Validate::XS::__ANON__[:12]
0000s0sParams::Validate::XS::::_check_regex_from_xsParams::Validate::XS::_check_regex_from_xs
0000s0sParams::Validate::XS::::validation_optionsParams::Validate::XS::validation_options
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Params::Validate::XS;
2
3use strict;
4use warnings;
5
6our $VERSION = '1.30';
7
8use Carp;
9
10my $default_fail = sub {
11 Carp::confess( $_[0] );
12};
13
14{
15 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 *set_options = \&validation_options;
25
26 sub validation_options {
27 my %opts = @_;
28
29 my $caller = caller;
30
31 foreach ( keys %defaults ) {
32 $opts{$_} = $defaults{$_} unless exists $opts{$_};
33 }
34
35 $Params::Validate::OPTIONS{$caller} = \%opts;
36 }
37
38 use XSLoader;
39 XSLoader::load(
40 __PACKAGE__,
41 exists $Params::Validate::XS::{VERSION}
42 ? ${ $Params::Validate::XS::{VERSION} }
43 : (),
44 );
45}
46
47sub _check_regex_from_xs {
48 return ( defined $_[0] ? $_[0] : '' ) =~ /$_[1]/ ? 1 : 0;
49}
50
511;