Filename | /usr/local/lib/perl/5.14.2/Params/Validate.pm |
Statements | Executed 30 statements in 524µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 811µs | 5.02ms | BEGIN@12 | Params::Validate::
1 | 1 | 1 | 261µs | 355µs | BEGIN@13 | Params::Validate::
1 | 1 | 1 | 21µs | 21µs | BEGIN@6 | Params::Validate::
1 | 1 | 1 | 15µs | 31µs | BEGIN@11 | Params::Validate::
1 | 1 | 1 | 7µs | 44µs | BEGIN@15 | Params::Validate::
1 | 1 | 1 | 7µs | 9µs | BEGIN@8 | Params::Validate::
1 | 1 | 1 | 6µs | 11µs | BEGIN@9 | Params::Validate::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Params::Validate; | ||||
2 | { | ||||
3 | 2 | 1µs | $Params::Validate::VERSION = '1.08'; | ||
4 | } | ||||
5 | |||||
6 | 2 | 43µs | 1 | 21µs | # spent 21µs within Params::Validate::BEGIN@6 which was called:
# once (21µs+0s) by DateTime::Duration::BEGIN@12 at line 6 # spent 21µs making 1 call to Params::Validate::BEGIN@6 |
7 | |||||
8 | 2 | 19µs | 2 | 12µs | # spent 9µs (7+3) within Params::Validate::BEGIN@8 which was called:
# once (7µs+3µs) by DateTime::Duration::BEGIN@12 at line 8 # spent 9µs making 1 call to Params::Validate::BEGIN@8
# spent 3µs making 1 call to strict::import |
9 | 2 | 19µs | 2 | 15µs | # spent 11µs (6+4) within Params::Validate::BEGIN@9 which was called:
# once (6µs+4µs) by DateTime::Duration::BEGIN@12 at line 9 # spent 11µs making 1 call to Params::Validate::BEGIN@9
# spent 4µs making 1 call to warnings::import |
10 | |||||
11 | 2 | 22µs | 2 | 47µs | # spent 31µs (15+16) within Params::Validate::BEGIN@11 which was called:
# once (15µs+16µs) by DateTime::Duration::BEGIN@12 at line 11 # spent 31µs making 1 call to Params::Validate::BEGIN@11
# spent 16µs making 1 call to Exporter::import |
12 | 2 | 113µs | 1 | 5.02ms | # spent 5.02ms (811µs+4.21) within Params::Validate::BEGIN@12 which was called:
# once (811µs+4.21ms) by DateTime::Duration::BEGIN@12 at line 12 # spent 5.02ms making 1 call to Params::Validate::BEGIN@12 |
13 | 2 | 118µs | 2 | 421µs | # spent 355µs (261+94) within Params::Validate::BEGIN@13 which was called:
# once (261µs+94µs) by DateTime::Duration::BEGIN@12 at line 13 # spent 355µs making 1 call to Params::Validate::BEGIN@13
# spent 66µs making 1 call to Exporter::import |
14 | |||||
15 | 2 | 149µs | 2 | 81µs | # spent 44µs (7+37) within Params::Validate::BEGIN@15 which was called:
# once (7µs+37µs) by DateTime::Duration::BEGIN@12 at line 15 # spent 44µs making 1 call to Params::Validate::BEGIN@15
# spent 37µs making 1 call to vars::import |
16 | |||||
17 | 1 | 5µs | our @ISA = 'Exporter'; | ||
18 | |||||
19 | 1 | 3µ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 | 1 | 600ns | our %EXPORT_TAGS = ( | ||
38 | 'all' => [ | ||||
39 | qw( validate validate_pos validation_options validate_with ), | ||||
40 | 2 | 8µs | map { @{ $tags{$_} } } keys %tags | ||
41 | ], | ||||
42 | %tags, | ||||
43 | ); | ||||
44 | |||||
45 | 2 | 3µs | our @EXPORT_OK = ( @{ $EXPORT_TAGS{all} }, 'set_options' ); | ||
46 | 1 | 700ns | our @EXPORT = qw( validate validate_pos ); | ||
47 | |||||
48 | 1 | 400ns | $NO_VALIDATION = $ENV{PERL_NO_VALIDATION}; | ||
49 | |||||
50 | { | ||||
51 | 2 | 4µs | 1 | 25µs | my $loader = Module::Implementation::build_loader_sub( # spent 25µ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 | 1 | 500ns | $ENV{PARAMS_VALIDATE_IMPLEMENTATION} = 'PP' if $ENV{PV_TEST_PERL}; | ||
65 | |||||
66 | 1 | 4µs | 1 | 686µs | $loader->(); # spent 686µs making 1 call to Module::Implementation::__ANON__[Module/Implementation.pm:47] |
67 | } | ||||
68 | |||||
69 | 1 | 12µs | 1; | ||
70 | |||||
71 | # ABSTRACT: Validate method/function parameters | ||||
72 | |||||
73 | __END__ |