Filename | /usr/lib/perl5/Params/Validate.pm |
Statements | Executed 27 statements in 684µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 537µs | 622µs | BEGIN@13 | Params::Validate::
1 | 1 | 1 | 14µs | 14µs | BEGIN@6 | Params::Validate::
1 | 1 | 1 | 7µs | 13µs | BEGIN@9 | Params::Validate::
1 | 1 | 1 | 6µs | 42µs | BEGIN@15 | Params::Validate::
1 | 1 | 1 | 6µs | 18µs | BEGIN@8 | Params::Validate::
1 | 1 | 1 | 6µs | 20µs | BEGIN@11 | Params::Validate::
1 | 1 | 1 | 5µs | 5µs | BEGIN@12 | Params::Validate::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Params::Validate; | ||||
2 | { | ||||
3 | 2 | 900ns | $Params::Validate::VERSION = '1.08'; | ||
4 | } | ||||
5 | |||||
6 | 2 | 38µs | 1 | 14µs | # spent 14µs within Params::Validate::BEGIN@6 which was called:
# once (14µs+0s) by Getopt::Long::Descriptive::BEGIN@10 at line 6 # spent 14µs making 1 call to Params::Validate::BEGIN@6 |
7 | |||||
8 | 2 | 19µs | 2 | 30µs | # spent 18µs (6+12) within Params::Validate::BEGIN@8 which was called:
# once (6µs+12µs) by Getopt::Long::Descriptive::BEGIN@10 at line 8 # spent 18µs making 1 call to Params::Validate::BEGIN@8
# spent 12µs making 1 call to strict::import |
9 | 2 | 19µs | 2 | 19µs | # spent 13µs (7+6) within Params::Validate::BEGIN@9 which was called:
# once (7µs+6µs) by Getopt::Long::Descriptive::BEGIN@10 at line 9 # spent 13µs making 1 call to Params::Validate::BEGIN@9
# spent 6µs making 1 call to warnings::import |
10 | |||||
11 | 2 | 18µs | 2 | 34µs | # spent 20µs (6+14) within Params::Validate::BEGIN@11 which was called:
# once (6µs+14µs) by Getopt::Long::Descriptive::BEGIN@10 at line 11 # spent 20µs making 1 call to Params::Validate::BEGIN@11
# spent 14µs making 1 call to Exporter::import |
12 | 2 | 19µs | 1 | 5µs | # spent 5µs within Params::Validate::BEGIN@12 which was called:
# once (5µs+0s) by Getopt::Long::Descriptive::BEGIN@10 at line 12 # spent 5µs making 1 call to Params::Validate::BEGIN@12 |
13 | 2 | 397µs | 2 | 675µs | # spent 622µs (537+85) within Params::Validate::BEGIN@13 which was called:
# once (537µs+85µs) by Getopt::Long::Descriptive::BEGIN@10 at line 13 # spent 622µs making 1 call to Params::Validate::BEGIN@13
# spent 53µs making 1 call to Exporter::import |
14 | |||||
15 | 2 | 140µs | 2 | 78µs | # spent 42µs (6+36) within Params::Validate::BEGIN@15 which was called:
# once (6µs+36µs) by Getopt::Long::Descriptive::BEGIN@10 at line 15 # spent 42µs making 1 call to Params::Validate::BEGIN@15
# spent 36µs making 1 call to vars::import |
16 | |||||
17 | 1 | 5µs | our @ISA = 'Exporter'; | ||
18 | |||||
19 | 1 | 2µ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 | 1 | 7µs | map { @{ $tags{$_} } } keys %tags | ||
41 | ], | ||||
42 | %tags, | ||||
43 | ); | ||||
44 | |||||
45 | 1 | 2µs | our @EXPORT_OK = ( @{ $EXPORT_TAGS{all} }, 'set_options' ); | ||
46 | 1 | 400ns | our @EXPORT = qw( validate validate_pos ); | ||
47 | |||||
48 | 1 | 500ns | $NO_VALIDATION = $ENV{PERL_NO_VALIDATION}; | ||
49 | |||||
50 | { | ||||
51 | 2 | 3µ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 | 900ns | $ENV{PARAMS_VALIDATE_IMPLEMENTATION} = 'PP' if $ENV{PV_TEST_PERL}; | ||
65 | |||||
66 | 1 | 4µs | 1 | 2.63ms | $loader->(); # spent 2.63ms making 1 call to Module::Implementation::__ANON__[Module/Implementation.pm:47] |
67 | } | ||||
68 | |||||
69 | 1 | 10µs | 1; | ||
70 | |||||
71 | # ABSTRACT: Validate method/function parameters | ||||
72 | |||||
73 | __END__ |