Filename | /usr/local/lib/perl/5.14.2/Params/Validate.pm |
Statements | Executed 30 statements in 1.17ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.85ms | 11.0ms | BEGIN@12 | Params::Validate::
1 | 1 | 1 | 594µs | 803µs | BEGIN@13 | Params::Validate::
1 | 1 | 1 | 40µs | 40µs | BEGIN@6 | Params::Validate::
1 | 1 | 1 | 16µs | 22µs | BEGIN@8 | Params::Validate::
1 | 1 | 1 | 15µs | 101µs | BEGIN@15 | Params::Validate::
1 | 1 | 1 | 15µs | 51µs | BEGIN@11 | Params::Validate::
1 | 1 | 1 | 14µs | 25µs | BEGIN@9 | Params::Validate::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Params::Validate; | ||||
2 | { | ||||
3 | 2 | 2µs | $Params::Validate::VERSION = '1.08'; | ||
4 | } | ||||
5 | |||||
6 | 2 | 99µs | 1 | 40µs | # spent 40µs within Params::Validate::BEGIN@6 which was called:
# once (40µs+0s) by DateTime::Duration::BEGIN@12 at line 6 # spent 40µs making 1 call to Params::Validate::BEGIN@6 |
7 | |||||
8 | 2 | 45µs | 2 | 29µs | # spent 22µs (16+7) within Params::Validate::BEGIN@8 which was called:
# once (16µs+7µs) by DateTime::Duration::BEGIN@12 at line 8 # spent 22µs making 1 call to Params::Validate::BEGIN@8
# spent 7µs making 1 call to strict::import |
9 | 2 | 45µs | 2 | 36µs | # spent 25µs (14+11) within Params::Validate::BEGIN@9 which was called:
# once (14µs+11µs) by DateTime::Duration::BEGIN@12 at line 9 # spent 25µs making 1 call to Params::Validate::BEGIN@9
# spent 11µs making 1 call to warnings::import |
10 | |||||
11 | 2 | 57µs | 2 | 86µs | # spent 51µs (15+36) within Params::Validate::BEGIN@11 which was called:
# once (15µs+36µs) by DateTime::Duration::BEGIN@12 at line 11 # spent 51µs making 1 call to Params::Validate::BEGIN@11
# spent 36µs making 1 call to Exporter::import |
12 | 2 | 238µs | 1 | 11.0ms | # spent 11.0ms (1.85+9.10) within Params::Validate::BEGIN@12 which was called:
# once (1.85ms+9.10ms) by DateTime::Duration::BEGIN@12 at line 12 # spent 11.0ms making 1 call to Params::Validate::BEGIN@12 |
13 | 2 | 226µs | 2 | 952µs | # spent 803µs (594+210) within Params::Validate::BEGIN@13 which was called:
# once (594µs+210µs) by DateTime::Duration::BEGIN@12 at line 13 # spent 803µs making 1 call to Params::Validate::BEGIN@13
# spent 149µs making 1 call to Exporter::import |
14 | |||||
15 | 2 | 348µs | 2 | 187µs | # spent 101µs (15+86) within Params::Validate::BEGIN@15 which was called:
# once (15µs+86µs) by DateTime::Duration::BEGIN@12 at line 15 # spent 101µs making 1 call to Params::Validate::BEGIN@15
# spent 86µs making 1 call to vars::import |
16 | |||||
17 | 1 | 11µs | our @ISA = 'Exporter'; | ||
18 | |||||
19 | 1 | 6µs | my %tags = ( | ||
20 | types => [ | ||||
21 | qw( | ||||
22 | SCALAR | ||||
23 | ARRAYREF | ||||
24 | HASHREF | ||||
25 | CODEREF | ||||
26 | GLOB | ||||
27 | GLOBREF | ||||
28 | SCALARREF | ||||
29 | HANDLE | ||||
30 | BOOLEAN | ||||
31 | UNDEF | ||||
32 | OBJECT | ||||
33 | ) | ||||
34 | ], | ||||
35 | ); | ||||
36 | |||||
37 | our %EXPORT_TAGS = ( | ||||
38 | 'all' => [ | ||||
39 | qw( validate validate_pos validation_options validate_with ), | ||||
40 | 3 | 20µs | map { @{ $tags{$_} } } keys %tags | ||
41 | ], | ||||
42 | %tags, | ||||
43 | ); | ||||
44 | |||||
45 | 2 | 8µs | our @EXPORT_OK = ( @{ $EXPORT_TAGS{all} }, 'set_options' ); | ||
46 | 1 | 2µs | our @EXPORT = qw( validate validate_pos ); | ||
47 | |||||
48 | 1 | 1µs | $NO_VALIDATION = $ENV{PERL_NO_VALIDATION}; | ||
49 | |||||
50 | { | ||||
51 | 4 | 20µs | 1 | 56µs | my $loader = Module::Implementation::build_loader_sub( # spent 56µs making 1 call to Module::Implementation::build_loader_sub |
52 | implementations => [ 'XS', 'PP' ], | ||||
53 | symbols => [ | ||||
54 | qw( | ||||
55 | validate | ||||
56 | validate_pos | ||||
57 | validate_with | ||||
58 | validation_options | ||||
59 | set_options | ||||
60 | ), | ||||
61 | ], | ||||
62 | ); | ||||
63 | |||||
64 | $ENV{PARAMS_VALIDATE_IMPLEMENTATION} = 'PP' if $ENV{PV_TEST_PERL}; | ||||
65 | |||||
66 | 1 | 1.45ms | $loader->(); # spent 1.45ms making 1 call to Module::Implementation::__ANON__[Module/Implementation.pm:47] | ||
67 | } | ||||
68 | |||||
69 | 1 | 43µs | 1; | ||
70 | |||||
71 | # ABSTRACT: Validate method/function parameters | ||||
72 | |||||
73 | __END__ |