Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Eval/Closure.pm |
Statements | Executed 5865 statements in 31.8ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
174 | 1 | 1 | 22.3ms | 22.3ms | _clean_eval | Eval::Closure::
174 | 1 | 1 | 2.76ms | 27.8ms | _clean_eval_closure | Eval::Closure::
174 | 2 | 2 | 2.62ms | 32.9ms | eval_closure | Eval::Closure::
1 | 1 | 1 | 2.12ms | 2.85ms | BEGIN@7 | Eval::Closure::
174 | 1 | 1 | 1.19ms | 1.31ms | _canonicalize_source | Eval::Closure::
174 | 1 | 1 | 1.17ms | 24.4ms | _make_compiler | Eval::Closure::
174 | 1 | 1 | 968µs | 968µs | _make_compiler_source | Eval::Closure::
174 | 1 | 1 | 959µs | 1.18ms | _validate_env | Eval::Closure::
174 | 1 | 1 | 130µs | 130µs | CORE:sort (opcode) | Eval::Closure::
49 | 1 | 1 | 109µs | 109µs | CORE:match (opcode) | Eval::Closure::
1 | 1 | 1 | 11µs | 13µs | BEGIN@5 | Eval::Closure::
1 | 1 | 1 | 9µs | 53µs | BEGIN@13 | Eval::Closure::
1 | 1 | 1 | 7µs | 38µs | BEGIN@16 | Eval::Closure::
1 | 1 | 1 | 7µs | 27µs | BEGIN@15 | Eval::Closure::
1 | 1 | 1 | 6µs | 13µs | BEGIN@6 | Eval::Closure::
1 | 1 | 1 | 4µs | 4µs | BEGIN@14 | Eval::Closure::
0 | 0 | 0 | 0s | 0s | __ANON__[:151] | Eval::Closure::
0 | 0 | 0 | 0s | 0s | _dump_source | Eval::Closure::
0 | 0 | 0 | 0s | 0s | _line_directive | Eval::Closure::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Eval::Closure; | ||||
2 | { | ||||
3 | 2 | 900ns | $Eval::Closure::VERSION = '0.08'; | ||
4 | } | ||||
5 | 3 | 17µs | 2 | 15µs | # spent 13µs (11+2) within Eval::Closure::BEGIN@5 which was called:
# once (11µs+2µs) by Class::MOP::Method::Generated::BEGIN@14 at line 5 # spent 13µs making 1 call to Eval::Closure::BEGIN@5
# spent 2µs making 1 call to strict::import |
6 | 3 | 27µs | 2 | 20µs | # spent 13µs (6+7) within Eval::Closure::BEGIN@6 which was called:
# once (6µs+7µs) by Class::MOP::Method::Generated::BEGIN@14 at line 6 # spent 13µs making 1 call to Eval::Closure::BEGIN@6
# spent 7µs making 1 call to warnings::import |
7 | 1 | 8µs | 1 | 280µs | # spent 2.85ms (2.12+730µs) within Eval::Closure::BEGIN@7 which was called:
# once (2.12ms+730µs) by Class::MOP::Method::Generated::BEGIN@14 at line 10 # spent 280µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756] |
8 | exports => [qw(eval_closure)], | ||||
9 | groups => { default => [qw(eval_closure)] }, | ||||
10 | 2 | 75µs | 1 | 2.85ms | }; # spent 2.85ms making 1 call to Eval::Closure::BEGIN@7 |
11 | # ABSTRACT: safely and cleanly create closures via string eval | ||||
12 | |||||
13 | 3 | 21µs | 2 | 97µs | # spent 53µs (9+44) within Eval::Closure::BEGIN@13 which was called:
# once (9µs+44µs) by Class::MOP::Method::Generated::BEGIN@14 at line 13 # spent 53µs making 1 call to Eval::Closure::BEGIN@13
# spent 44µs making 1 call to Exporter::import |
14 | 3 | 18µs | 1 | 4µs | # spent 4µs within Eval::Closure::BEGIN@14 which was called:
# once (4µs+0s) by Class::MOP::Method::Generated::BEGIN@14 at line 14 # spent 4µs making 1 call to Eval::Closure::BEGIN@14 |
15 | 3 | 18µs | 2 | 47µs | # spent 27µs (7+20) within Eval::Closure::BEGIN@15 which was called:
# once (7µs+20µs) by Class::MOP::Method::Generated::BEGIN@14 at line 15 # spent 27µs making 1 call to Eval::Closure::BEGIN@15
# spent 20µs making 1 call to Exporter::import |
16 | 3 | 619µs | 2 | 68µs | # spent 38µs (7+30) within Eval::Closure::BEGIN@16 which was called:
# once (7µs+30µs) by Class::MOP::Method::Generated::BEGIN@14 at line 16 # spent 38µs making 1 call to Eval::Closure::BEGIN@16
# spent 30µs making 1 call to Exporter::import |
17 | |||||
- - | |||||
20 | # spent 32.9ms (2.62+30.3) within Eval::Closure::eval_closure which was called 174 times, avg 189µs/call:
# 133 times (2.01ms+25.0ms) by Class::MOP::Method::Generated::_compile_code at line 63 of Class/MOP/Method/Generated.pm, avg 203µs/call
# 41 times (612µs+5.27ms) by Moose::Meta::TypeConstraint::_actually_compile_type_constraint at line 320 of Moose/Meta/TypeConstraint.pm, avg 143µs/call | ||||
21 | 174 | 469µs | my (%args) = @_; | ||
22 | |||||
23 | 174 | 382µs | 174 | 1.31ms | $args{source} = _canonicalize_source($args{source}); # spent 1.31ms making 174 calls to Eval::Closure::_canonicalize_source, avg 8µs/call |
24 | 174 | 294µs | 174 | 1.18ms | _validate_env($args{environment} ||= {}); # spent 1.18ms making 174 calls to Eval::Closure::_validate_env, avg 7µs/call |
25 | |||||
26 | 174 | 221µs | $args{source} = _line_directive(@args{qw(line description)}) | ||
27 | . $args{source} | ||||
28 | if defined $args{description} && !($^P & 0x10); | ||||
29 | |||||
30 | 174 | 449µs | 174 | 27.8ms | my ($code, $e) = _clean_eval_closure(@args{qw(source environment)}); # spent 27.8ms making 174 calls to Eval::Closure::_clean_eval_closure, avg 160µs/call |
31 | |||||
32 | 174 | 48µs | if (!$code) { | ||
33 | if ($args{terse_error}) { | ||||
34 | die "$e\n"; | ||||
35 | } | ||||
36 | else { | ||||
37 | croak("Failed to compile source: $e\n\nsource:\n$args{source}") | ||||
38 | } | ||||
39 | } | ||||
40 | |||||
41 | 174 | 452µs | return $code; | ||
42 | } | ||||
43 | |||||
44 | # spent 1.31ms (1.19+123µs) within Eval::Closure::_canonicalize_source which was called 174 times, avg 8µs/call:
# 174 times (1.19ms+123µs) by Eval::Closure::eval_closure at line 23, avg 8µs/call | ||||
45 | 174 | 74µs | my ($source) = @_; | ||
46 | |||||
47 | 174 | 75µs | if (defined($source)) { | ||
48 | 174 | 86µs | if (ref($source)) { | ||
49 | 133 | 1.08ms | 133 | 123µs | if (reftype($source) eq 'ARRAY' # spent 123µs making 133 calls to Scalar::Util::reftype, avg 923ns/call |
50 | || overload::Method($source, '@{}')) { | ||||
51 | return join "\n", @$source; | ||||
52 | } | ||||
53 | elsif (overload::Method($source, '""')) { | ||||
54 | return "$source"; | ||||
55 | } | ||||
56 | else { | ||||
57 | croak("The 'source' parameter to eval_closure must be a " | ||||
58 | . "string or array reference"); | ||||
59 | } | ||||
60 | } | ||||
61 | else { | ||||
62 | 41 | 102µs | return $source; | ||
63 | } | ||||
64 | } | ||||
65 | else { | ||||
66 | croak("The 'source' parameter to eval_closure is required"); | ||||
67 | } | ||||
68 | } | ||||
69 | |||||
70 | # spent 1.18ms (959µs+225µs) within Eval::Closure::_validate_env which was called 174 times, avg 7µs/call:
# 174 times (959µs+225µs) by Eval::Closure::eval_closure at line 24, avg 7µs/call | ||||
71 | 174 | 75µs | my ($env) = @_; | ||
72 | |||||
73 | 174 | 422µs | 174 | 116µs | croak("The 'environment' parameter must be a hashref") # spent 116µs making 174 calls to Scalar::Util::reftype, avg 665ns/call |
74 | unless reftype($env) eq 'HASH'; | ||||
75 | |||||
76 | 174 | 528µs | for my $var (keys %$env) { | ||
77 | 49 | 213µs | 49 | 109µs | croak("Environment key '$var' should start with \@, \%, or \$") # spent 109µs making 49 calls to Eval::Closure::CORE:match, avg 2µs/call |
78 | unless $var =~ /^([\@\%\$])/; | ||||
79 | 49 | 63µs | croak("Environment values must be references, not $env->{$var}") | ||
80 | unless ref($env->{$var}); | ||||
81 | } | ||||
82 | } | ||||
83 | |||||
84 | sub _line_directive { | ||||
85 | my ($line, $description) = @_; | ||||
86 | |||||
87 | $line = 1 unless defined($line); | ||||
88 | |||||
89 | return qq{#line $line "$description"\n}; | ||||
90 | } | ||||
91 | |||||
92 | # spent 27.8ms (2.76+25.0) within Eval::Closure::_clean_eval_closure which was called 174 times, avg 160µs/call:
# 174 times (2.76ms+25.0ms) by Eval::Closure::eval_closure at line 30, avg 160µs/call | ||||
93 | 174 | 150µs | my ($source, $captures) = @_; | ||
94 | |||||
95 | 174 | 524µs | 174 | 130µs | my @capture_keys = sort keys %$captures; # spent 130µs making 174 calls to Eval::Closure::CORE:sort, avg 750ns/call |
96 | |||||
97 | 174 | 118µs | if ($ENV{EVAL_CLOSURE_PRINT_SOURCE}) { | ||
98 | _dump_source(_make_compiler_source($source, @capture_keys)); | ||||
99 | } | ||||
100 | |||||
101 | 174 | 341µs | 174 | 24.4ms | my ($compiler, $e) = _make_compiler($source, @capture_keys); # spent 24.4ms making 174 calls to Eval::Closure::_make_compiler, avg 140µs/call |
102 | 174 | 38µs | my $code; | ||
103 | 174 | 357µs | 174 | 482µs | if (defined $compiler) { # spent 12µs making 1 call to Eval::Closure::Sandbox_70::__ANON__[(eval 156)[Eval/Closure.pm:125]:100]
# spent 8µs making 1 call to Eval::Closure::Sandbox_161::__ANON__[(eval 265)[Eval/Closure.pm:125]:4]
# spent 8µs making 1 call to Eval::Closure::Sandbox_160::__ANON__[(eval 264)[Eval/Closure.pm:125]:4]
# spent 7µs making 1 call to Eval::Closure::Sandbox_118::__ANON__[(eval 204)[Eval/Closure.pm:125]:142]
# spent 6µs making 1 call to Eval::Closure::Sandbox_103::__ANON__[(eval 189)[Eval/Closure.pm:125]:133]
# spent 6µs making 1 call to Eval::Closure::Sandbox_19::__ANON__[(eval 87)[Eval/Closure.pm:125]:52]
# spent 6µs making 1 call to Eval::Closure::Sandbox_77::__ANON__[(eval 163)[Eval/Closure.pm:125]:106]
# spent 5µs making 1 call to Eval::Closure::Sandbox_109::__ANON__[(eval 195)[Eval/Closure.pm:125]:100]
# spent 4µs making 1 call to Eval::Closure::Sandbox_88::__ANON__[(eval 174)[Eval/Closure.pm:125]:28]
# spent 4µs making 1 call to Eval::Closure::Sandbox_31::__ANON__[(eval 99)[Eval/Closure.pm:125]:58]
# spent 4µs making 1 call to Eval::Closure::Sandbox_35::__ANON__[(eval 103)[Eval/Closure.pm:125]:55]
# spent 4µs making 1 call to Eval::Closure::Sandbox_85::__ANON__[(eval 171)[Eval/Closure.pm:125]:46]
# spent 4µs making 1 call to Eval::Closure::Sandbox_62::__ANON__[(eval 130)[Eval/Closure.pm:125]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_38::__ANON__[(eval 106)[Eval/Closure.pm:125]:58]
# spent 4µs making 1 call to Eval::Closure::Sandbox_155::__ANON__[(eval 253)[Eval/Closure.pm:125]:22]
# spent 4µs making 1 call to Eval::Closure::Sandbox_21::__ANON__[(eval 89)[Eval/Closure.pm:125]:58]
# spent 4µs making 1 call to Eval::Closure::Sandbox_26::__ANON__[(eval 94)[Eval/Closure.pm:125]:58]
# spent 4µs making 1 call to Eval::Closure::Sandbox_33::__ANON__[(eval 101)[Eval/Closure.pm:125]:55]
# spent 4µs making 1 call to Eval::Closure::Sandbox_40::__ANON__[(eval 108)[Eval/Closure.pm:125]:55]
# spent 4µs making 1 call to Eval::Closure::Sandbox_167::__ANON__[(eval 321)[Eval/Closure.pm:125]:15]
# spent 4µs making 1 call to Eval::Closure::Sandbox_164::__ANON__[(eval 318)[Eval/Closure.pm:125]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_86::__ANON__[(eval 172)[Eval/Closure.pm:125]:40]
# spent 4µs making 1 call to Eval::Closure::Sandbox_84::__ANON__[(eval 170)[Eval/Closure.pm:125]:28]
# spent 4µs making 1 call to Eval::Closure::Sandbox_168::__ANON__[(eval 322)[Eval/Closure.pm:125]:15]
# spent 4µs making 1 call to Eval::Closure::Sandbox_110::__ANON__[(eval 196)[Eval/Closure.pm:125]:28]
# spent 4µs making 1 call to Eval::Closure::Sandbox_121::__ANON__[(eval 207)[Eval/Closure.pm:125]:25]
# spent 4µs making 1 call to Eval::Closure::Sandbox_123::__ANON__[(eval 209)[Eval/Closure.pm:125]:31]
# spent 4µs making 1 call to Eval::Closure::Sandbox_78::__ANON__[(eval 164)[Eval/Closure.pm:125]:25]
# spent 4µs making 1 call to Eval::Closure::Sandbox_82::__ANON__[(eval 168)[Eval/Closure.pm:125]:27]
# spent 4µs making 1 call to Eval::Closure::Sandbox_83::__ANON__[(eval 169)[Eval/Closure.pm:125]:27]
# spent 4µs making 1 call to Eval::Closure::Sandbox_126::__ANON__[(eval 212)[Eval/Closure.pm:125]:31]
# spent 3µs making 1 call to Eval::Closure::Sandbox_114::__ANON__[(eval 200)[Eval/Closure.pm:125]:19]
# spent 3µs making 1 call to Eval::Closure::Sandbox_129::__ANON__[(eval 215)[Eval/Closure.pm:125]:31]
# spent 3µs making 1 call to Eval::Closure::Sandbox_166::__ANON__[(eval 320)[Eval/Closure.pm:125]:14]
# spent 3µs making 1 call to Eval::Closure::Sandbox_127::__ANON__[(eval 213)[Eval/Closure.pm:125]:25]
# spent 3µs making 1 call to Eval::Closure::Sandbox_45::__ANON__[(eval 113)[Eval/Closure.pm:125]:22]
# spent 3µs making 1 call to Eval::Closure::Sandbox_87::__ANON__[(eval 173)[Eval/Closure.pm:125]:28]
# spent 3µs making 1 call to Eval::Closure::Sandbox_102::__ANON__[(eval 188)[Eval/Closure.pm:125]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_158::__ANON__[(eval 260)[Eval/Closure.pm:125]:15]
# spent 3µs making 1 call to Eval::Closure::Sandbox_165::__ANON__[(eval 319)[Eval/Closure.pm:125]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_80::__ANON__[(eval 166)[Eval/Closure.pm:125]:10]
# spent 3µs making 1 call to Eval::Closure::Sandbox_4::__ANON__[(eval 72)[Eval/Closure.pm:125]:6]
# spent 3µs making 1 call to Eval::Closure::Sandbox_112::__ANON__[(eval 198)[Eval/Closure.pm:125]:16]
# spent 3µs making 1 call to Eval::Closure::Sandbox_131::__ANON__[(eval 217)[Eval/Closure.pm:125]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_170::__ANON__[(eval 324)[Eval/Closure.pm:125]:11]
# spent 3µs making 1 call to Eval::Closure::Sandbox_1::__ANON__[(eval 69)[Eval/Closure.pm:125]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_65::__ANON__[(eval 133)[Eval/Closure.pm:125]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_29::__ANON__[(eval 97)[Eval/Closure.pm:125]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_67::__ANON__[(eval 138)[Eval/Closure.pm:125]:10]
# spent 3µs making 1 call to Eval::Closure::Sandbox_173::__ANON__[(eval 1433)[Eval/Closure.pm:125]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_169::__ANON__[(eval 323)[Eval/Closure.pm:125]:10]
# spent 3µs making 1 call to Eval::Closure::Sandbox_152::__ANON__[(eval 241)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_172::__ANON__[(eval 328)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_13::__ANON__[(eval 81)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_153::__ANON__[(eval 251)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_16::__ANON__[(eval 84)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_22::__ANON__[(eval 90)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_53::__ANON__[(eval 121)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_71::__ANON__[(eval 157)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_79::__ANON__[(eval 165)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_94::__ANON__[(eval 180)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_174::__ANON__[(eval 1434)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_104::__ANON__[(eval 190)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_106::__ANON__[(eval 192)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_115::__ANON__[(eval 201)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_116::__ANON__[(eval 202)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_119::__ANON__[(eval 205)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_124::__ANON__[(eval 210)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_130::__ANON__[(eval 216)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_133::__ANON__[(eval 219)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_135::__ANON__[(eval 221)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_147::__ANON__[(eval 233)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_149::__ANON__[(eval 235)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_150::__ANON__[(eval 237)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_156::__ANON__[(eval 258)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_17::__ANON__[(eval 85)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_25::__ANON__[(eval 93)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_5::__ANON__[(eval 73)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_63::__ANON__[(eval 131)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_68::__ANON__[(eval 154)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_6::__ANON__[(eval 74)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_75::__ANON__[(eval 161)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_81::__ANON__[(eval 167)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_89::__ANON__[(eval 175)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_90::__ANON__[(eval 176)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_91::__ANON__[(eval 177)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_92::__ANON__[(eval 178)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_93::__ANON__[(eval 179)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_101::__ANON__[(eval 187)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_107::__ANON__[(eval 193)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_111::__ANON__[(eval 197)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_113::__ANON__[(eval 199)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_11::__ANON__[(eval 79)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_120::__ANON__[(eval 206)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_128::__ANON__[(eval 214)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_12::__ANON__[(eval 80)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_132::__ANON__[(eval 218)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_136::__ANON__[(eval 222)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_137::__ANON__[(eval 223)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_138::__ANON__[(eval 224)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_140::__ANON__[(eval 226)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_143::__ANON__[(eval 229)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_144::__ANON__[(eval 230)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_146::__ANON__[(eval 232)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_148::__ANON__[(eval 234)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_14::__ANON__[(eval 82)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_151::__ANON__[(eval 238)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_154::__ANON__[(eval 252)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_159::__ANON__[(eval 261)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_20::__ANON__[(eval 88)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_23::__ANON__[(eval 91)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_24::__ANON__[(eval 92)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_27::__ANON__[(eval 95)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_32::__ANON__[(eval 100)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_34::__ANON__[(eval 102)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_37::__ANON__[(eval 105)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_39::__ANON__[(eval 107)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_3::__ANON__[(eval 71)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_42::__ANON__[(eval 110)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_43::__ANON__[(eval 111)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_46::__ANON__[(eval 114)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_47::__ANON__[(eval 115)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_49::__ANON__[(eval 117)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_52::__ANON__[(eval 120)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_55::__ANON__[(eval 123)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_57::__ANON__[(eval 125)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_59::__ANON__[(eval 127)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_69::__ANON__[(eval 155)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_72::__ANON__[(eval 158)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_74::__ANON__[(eval 160)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_76::__ANON__[(eval 162)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_97::__ANON__[(eval 183)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_100::__ANON__[(eval 186)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_105::__ANON__[(eval 191)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_108::__ANON__[(eval 194)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_10::__ANON__[(eval 78)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_117::__ANON__[(eval 203)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_122::__ANON__[(eval 208)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_134::__ANON__[(eval 220)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_139::__ANON__[(eval 225)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_141::__ANON__[(eval 227)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_142::__ANON__[(eval 228)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_15::__ANON__[(eval 83)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_162::__ANON__[(eval 311)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_163::__ANON__[(eval 312)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_171::__ANON__[(eval 325)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_28::__ANON__[(eval 96)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_2::__ANON__[(eval 70)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_30::__ANON__[(eval 98)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_36::__ANON__[(eval 104)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_41::__ANON__[(eval 109)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_44::__ANON__[(eval 112)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_48::__ANON__[(eval 116)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_50::__ANON__[(eval 118)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_54::__ANON__[(eval 122)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_58::__ANON__[(eval 126)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_60::__ANON__[(eval 128)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_73::__ANON__[(eval 159)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_7::__ANON__[(eval 75)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_8::__ANON__[(eval 76)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_95::__ANON__[(eval 181)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_96::__ANON__[(eval 182)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_98::__ANON__[(eval 184)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_99::__ANON__[(eval 185)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_125::__ANON__[(eval 211)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_145::__ANON__[(eval 231)[Eval/Closure.pm:125]:9]
# spent 2µs making 1 call to Eval::Closure::Sandbox_18::__ANON__[(eval 86)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_51::__ANON__[(eval 119)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_56::__ANON__[(eval 124)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_61::__ANON__[(eval 129)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_64::__ANON__[(eval 132)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_9::__ANON__[(eval 77)[Eval/Closure.pm:125]:6]
# spent 2µs making 1 call to Eval::Closure::Sandbox_66::__ANON__[(eval 134)[Eval/Closure.pm:125]:4]
# spent 2µs making 1 call to Eval::Closure::Sandbox_157::__ANON__[(eval 259)[Eval/Closure.pm:125]:4] |
104 | $code = $compiler->(@$captures{@capture_keys}); | ||||
105 | } | ||||
106 | |||||
107 | 174 | 156µs | if (defined($code) && (!ref($code) || ref($code) ne 'CODE')) { | ||
108 | $e = "The 'source' parameter must return a subroutine reference, " | ||||
109 | . "not $code"; | ||||
110 | undef $code; | ||||
111 | } | ||||
112 | |||||
113 | 174 | 446µs | return ($code, $e); | ||
114 | } | ||||
115 | |||||
116 | # spent 24.4ms (1.17+23.2) within Eval::Closure::_make_compiler which was called 174 times, avg 140µs/call:
# 174 times (1.17ms+23.2ms) by Eval::Closure::_clean_eval_closure at line 101, avg 140µs/call | ||||
117 | 174 | 307µs | 174 | 968µs | my $source = _make_compiler_source(@_); # spent 968µs making 174 calls to Eval::Closure::_make_compiler_source, avg 6µs/call |
118 | |||||
119 | 174 | 584µs | 174 | 22.3ms | return @{ _clean_eval($source) }; # spent 22.3ms making 174 calls to Eval::Closure::_clean_eval, avg 128µs/call |
120 | } | ||||
121 | |||||
122 | # spent 22.3ms within Eval::Closure::_clean_eval which was called 174 times, avg 128µs/call:
# 174 times (22.3ms+0s) by Eval::Closure::_make_compiler at line 119, avg 128µs/call | ||||
123 | 174 | 40µs | local $@; | ||
124 | 174 | 432µs | local $SIG{__DIE__}; | ||
125 | 174 | 20.6ms | my $compiler = eval $_[0]; # spent 3.69ms executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 2.25ms executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 924µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 884µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 499µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 489µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 478µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 409µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 391µs executing statements in string eval # includes 6µs spent executing 1 call to 2 subs defined therein. # spent 376µs executing statements in string eval # includes 12µs spent executing 1 call to 2 subs defined therein. # spent 361µs executing statements in string eval # includes 6µs spent executing 1 call to 2 subs defined therein. # spent 271µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 262µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 259µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 256µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 205µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 197µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 197µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 181µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 180µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 173µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 158µs executing statements in 2 string evals (merged) # includes 5µs spent executing 2 calls to 4 subs defined therein. # spent 152µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 143µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 141µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 138µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 130µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 113µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 104µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 93µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 76µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 69µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 67µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 65µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 65µs executing statements in string eval # includes 35µs spent executing 2 calls to 2 subs defined therein. # spent 64µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 63µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 60µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 58µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 56µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 50µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 46µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 43µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 42µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 39µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 38µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 38µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 37µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 36µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 35µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 34µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 32µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 31µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 28µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 28µs executing statements in string eval # includes 8µs spent executing 1 call to 2 subs defined therein. # spent 27µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 27µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 25µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 24µs executing statements in string eval # includes 11µs spent executing 2 calls to 2 subs defined therein. # spent 24µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 23µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 22µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 21µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 21µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 20µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 19µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 19µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 13µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 13µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 13µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 13µs executing statements in string eval # includes 7µs spent executing 1 call to 2 subs defined therein. # spent 13µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 6µs spent executing 2 calls to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 6µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 11µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 10µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 9µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 8µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. # spent 7µs executing statements in string eval # includes 2µs spent executing 1 call to 2 subs defined therein. | ||
126 | 174 | 71µs | my $e = $@; | ||
127 | 174 | 718µs | [ $compiler, $e ]; | ||
128 | } | ||||
129 | |||||
130 | 1 | 200ns | $Eval::Closure::SANDBOX_ID = 0; | ||
131 | |||||
132 | # spent 968µs within Eval::Closure::_make_compiler_source which was called 174 times, avg 6µs/call:
# 174 times (968µs+0s) by Eval::Closure::_make_compiler at line 117, avg 6µs/call | ||||
133 | 174 | 136µs | my ($source, @capture_keys) = @_; | ||
134 | 174 | 48µs | $Eval::Closure::SANDBOX_ID++; | ||
135 | 174 | 48µs | my $i = 0; | ||
136 | return join "\n", ( | ||||
137 | "package Eval::Closure::Sandbox_$Eval::Closure::SANDBOX_ID;", | ||||
138 | 'sub {', | ||||
139 | (map { | ||||
140 | 174 | 885µs | 'my ' . $_ . ' = ' . substr($_, 0, 1) . '{$_[' . $i++ . ']};' | ||
141 | } @capture_keys), | ||||
142 | $source, | ||||
143 | '}', | ||||
144 | ); | ||||
145 | } | ||||
146 | |||||
147 | sub _dump_source { | ||||
148 | my ($source) = @_; | ||||
149 | |||||
150 | my $output; | ||||
151 | if (try { require Perl::Tidy }) { | ||||
152 | Perl::Tidy::perltidy( | ||||
153 | source => \$source, | ||||
154 | destination => \$output, | ||||
155 | argv => [], | ||||
156 | ); | ||||
157 | } | ||||
158 | else { | ||||
159 | $output = $source; | ||||
160 | } | ||||
161 | |||||
162 | warn "$output\n"; | ||||
163 | } | ||||
164 | |||||
165 | |||||
166 | 1 | 3µs | 1; | ||
167 | |||||
168 | __END__ | ||||
# spent 109µs within Eval::Closure::CORE:match which was called 49 times, avg 2µs/call:
# 49 times (109µs+0s) by Eval::Closure::_validate_env at line 77, avg 2µs/call | |||||
# spent 130µs within Eval::Closure::CORE:sort which was called 174 times, avg 750ns/call:
# 174 times (130µs+0s) by Eval::Closure::_clean_eval_closure at line 95, avg 750ns/call |