Filename | /opt/perl-5.18.1/lib/site_perl/5.18.1/Eval/Closure.pm |
Statements | Executed 5952 statements in 38.7ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
158 | 1 | 1 | 24.8ms | 24.8ms | _clean_eval | Eval::Closure::
158 | 1 | 1 | 5.50ms | 5.67ms | _make_compiler_source | Eval::Closure::
158 | 1 | 1 | 2.59ms | 35.2ms | _clean_eval_closure | Eval::Closure::
158 | 2 | 2 | 2.41ms | 39.8ms | eval_closure | Eval::Closure::
158 | 1 | 1 | 1.37ms | 31.9ms | _make_compiler | Eval::Closure::
158 | 1 | 1 | 970µs | 1.12ms | _validate_env | Eval::Closure::
158 | 1 | 1 | 945µs | 1.05ms | _canonicalize_source | Eval::Closure::
40 | 1 | 1 | 170µs | 170µs | _make_lexical_assignment | Eval::Closure::
158 | 1 | 1 | 88µs | 88µs | CORE:sort (opcode) | Eval::Closure::
40 | 1 | 1 | 63µs | 63µs | CORE:match (opcode) | Eval::Closure::
1 | 1 | 1 | 15µs | 57µs | BEGIN@20 | Eval::Closure::
1 | 1 | 1 | 15µs | 24µs | BEGIN@12 | Eval::Closure::
1 | 1 | 1 | 10µs | 10µs | BEGIN@2 | Eval::Closure::
1 | 1 | 1 | 10µs | 51µs | BEGIN@15 | Eval::Closure::
1 | 1 | 1 | 9µs | 48µs | BEGIN@18 | Eval::Closure::
1 | 1 | 1 | 9µs | 24µs | BEGIN@8 | Eval::Closure::
1 | 1 | 1 | 9µs | 13µs | BEGIN@9 | Eval::Closure::
1 | 1 | 1 | 8µs | 35µs | BEGIN@17 | Eval::Closure::
1 | 1 | 1 | 4µs | 4µs | BEGIN@16 | Eval::Closure::
0 | 0 | 0 | 0s | 0s | __ANON__[:187] | 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 | # spent 10µs within Eval::Closure::BEGIN@2 which was called:
# once (10µs+0s) by Class::MOP::Method::Generated::BEGIN@14 at line 4 | ||||
3 | 1 | 6µs | $Eval::Closure::AUTHORITY = 'cpan:DOY'; | ||
4 | 1 | 42µs | 1 | 10µs | } # spent 10µs making 1 call to Eval::Closure::BEGIN@2 |
5 | { | ||||
6 | 2 | 1µs | $Eval::Closure::VERSION = '0.11'; | ||
7 | } | ||||
8 | 2 | 30µs | 2 | 40µs | # spent 24µs (9+15) within Eval::Closure::BEGIN@8 which was called:
# once (9µs+15µs) by Class::MOP::Method::Generated::BEGIN@14 at line 8 # spent 24µs making 1 call to Eval::Closure::BEGIN@8
# spent 16µs making 1 call to strict::import |
9 | 2 | 32µs | 2 | 18µs | # spent 13µs (9+4) within Eval::Closure::BEGIN@9 which was called:
# once (9µs+4µs) by Class::MOP::Method::Generated::BEGIN@14 at line 9 # spent 13µs making 1 call to Eval::Closure::BEGIN@9
# spent 4µs making 1 call to warnings::import |
10 | # ABSTRACT: safely and cleanly create closures via string eval | ||||
11 | |||||
12 | 2 | 50µs | 2 | 33µs | # spent 24µs (15+9) within Eval::Closure::BEGIN@12 which was called:
# once (15µs+9µs) by Class::MOP::Method::Generated::BEGIN@14 at line 12 # spent 24µs making 1 call to Eval::Closure::BEGIN@12
# spent 9µs making 1 call to Exporter::import |
13 | 1 | 2µs | @Eval::Closure::EXPORT = @Eval::Closure::EXPORT_OK = 'eval_closure'; | ||
14 | |||||
15 | 2 | 30µs | 2 | 92µs | # spent 51µs (10+41) within Eval::Closure::BEGIN@15 which was called:
# once (10µs+41µs) by Class::MOP::Method::Generated::BEGIN@14 at line 15 # spent 51µs making 1 call to Eval::Closure::BEGIN@15
# spent 41µs making 1 call to Exporter::import |
16 | 2 | 29µs | 1 | 4µs | # spent 4µs within Eval::Closure::BEGIN@16 which was called:
# once (4µs+0s) by Class::MOP::Method::Generated::BEGIN@14 at line 16 # spent 4µs making 1 call to Eval::Closure::BEGIN@16 |
17 | 2 | 29µs | 2 | 62µs | # spent 35µs (8+27) within Eval::Closure::BEGIN@17 which was called:
# once (8µs+27µs) by Class::MOP::Method::Generated::BEGIN@14 at line 17 # spent 35µs making 1 call to Eval::Closure::BEGIN@17
# spent 27µs making 1 call to Exporter::import |
18 | 2 | 38µs | 2 | 88µs | # spent 48µs (9+39) within Eval::Closure::BEGIN@18 which was called:
# once (9µs+39µs) by Class::MOP::Method::Generated::BEGIN@14 at line 18 # spent 48µs making 1 call to Eval::Closure::BEGIN@18
# spent 39µs making 1 call to Exporter::import |
19 | |||||
20 | 2 | 1.22ms | 2 | 99µs | # spent 57µs (15+42) within Eval::Closure::BEGIN@20 which was called:
# once (15µs+42µs) by Class::MOP::Method::Generated::BEGIN@14 at line 20 # spent 57µs making 1 call to Eval::Closure::BEGIN@20
# spent 42µs making 1 call to constant::import |
21 | |||||
- - | |||||
24 | # spent 39.8ms (2.41+37.4) within Eval::Closure::eval_closure which was called 158 times, avg 252µs/call:
# 129 times (2.00ms+33.3ms) by Class::MOP::Method::Generated::_compile_code at line 63 of Class/MOP/Method/Generated.pm, avg 274µs/call
# 29 times (412µs+4.05ms) by Moose::Meta::TypeConstraint::_actually_compile_type_constraint at line 311 of Moose/Meta/TypeConstraint.pm, avg 154µs/call | ||||
25 | 158 | 239µs | my (%args) = @_; | ||
26 | |||||
27 | # default to copying environment | ||||
28 | 158 | 118µs | $args{alias} = 0 if !exists $args{alias}; | ||
29 | |||||
30 | 158 | 238µs | 158 | 1.05ms | $args{source} = _canonicalize_source($args{source}); # spent 1.05ms making 158 calls to Eval::Closure::_canonicalize_source, avg 7µs/call |
31 | 158 | 226µs | 158 | 1.12ms | _validate_env($args{environment} ||= {}); # spent 1.12ms making 158 calls to Eval::Closure::_validate_env, avg 7µs/call |
32 | |||||
33 | 158 | 157µs | $args{source} = _line_directive(@args{qw(line description)}) | ||
34 | . $args{source} | ||||
35 | if defined $args{description} && !($^P & 0x10); | ||||
36 | |||||
37 | 158 | 344µs | 158 | 35.2ms | my ($code, $e) = _clean_eval_closure(@args{qw(source environment alias)}); # spent 35.2ms making 158 calls to Eval::Closure::_clean_eval_closure, avg 223µs/call |
38 | |||||
39 | 158 | 32µs | if (!$code) { | ||
40 | if ($args{terse_error}) { | ||||
41 | die "$e\n"; | ||||
42 | } | ||||
43 | else { | ||||
44 | croak("Failed to compile source: $e\n\nsource:\n$args{source}") | ||||
45 | } | ||||
46 | } | ||||
47 | |||||
48 | 158 | 520µs | return $code; | ||
49 | } | ||||
50 | |||||
51 | # spent 1.05ms (945µs+108µs) within Eval::Closure::_canonicalize_source which was called 158 times, avg 7µs/call:
# 158 times (945µs+108µs) by Eval::Closure::eval_closure at line 30, avg 7µs/call | ||||
52 | 158 | 37µs | my ($source) = @_; | ||
53 | |||||
54 | 158 | 35µs | if (defined($source)) { | ||
55 | 158 | 52µs | if (ref($source)) { | ||
56 | 129 | 1.02ms | 129 | 108µs | if (reftype($source) eq 'ARRAY' # spent 108µs making 129 calls to Scalar::Util::reftype, avg 836ns/call |
57 | || overload::Method($source, '@{}')) { | ||||
58 | return join "\n", @$source; | ||||
59 | } | ||||
60 | elsif (overload::Method($source, '""')) { | ||||
61 | return "$source"; | ||||
62 | } | ||||
63 | else { | ||||
64 | croak("The 'source' parameter to eval_closure must be a " | ||||
65 | . "string or array reference"); | ||||
66 | } | ||||
67 | } | ||||
68 | else { | ||||
69 | 29 | 78µs | return $source; | ||
70 | } | ||||
71 | } | ||||
72 | else { | ||||
73 | croak("The 'source' parameter to eval_closure is required"); | ||||
74 | } | ||||
75 | } | ||||
76 | |||||
77 | # spent 1.12ms (970µs+150µs) within Eval::Closure::_validate_env which was called 158 times, avg 7µs/call:
# 158 times (970µs+150µs) by Eval::Closure::eval_closure at line 31, avg 7µs/call | ||||
78 | 158 | 36µs | my ($env) = @_; | ||
79 | |||||
80 | 158 | 401µs | 158 | 86µs | croak("The 'environment' parameter must be a hashref") # spent 86µs making 158 calls to Scalar::Util::reftype, avg 547ns/call |
81 | unless reftype($env) eq 'HASH'; | ||||
82 | |||||
83 | 158 | 548µs | for my $var (keys %$env) { | ||
84 | 40 | 4µs | if (HAS_LEXICAL_SUBS) { | ||
85 | 40 | 143µs | 40 | 63µs | croak("Environment key '$var' should start with \@, \%, \$, or \&") # spent 63µs making 40 calls to Eval::Closure::CORE:match, avg 2µs/call |
86 | unless $var =~ /^([\@\%\$\&])/; | ||||
87 | } | ||||
88 | else { | ||||
89 | croak("Environment key '$var' should start with \@, \%, or \$") | ||||
90 | unless $var =~ /^([\@\%\$])/; | ||||
91 | } | ||||
92 | 40 | 48µs | croak("Environment values must be references, not $env->{$var}") | ||
93 | unless ref($env->{$var}); | ||||
94 | } | ||||
95 | } | ||||
96 | |||||
97 | sub _line_directive { | ||||
98 | my ($line, $description) = @_; | ||||
99 | |||||
100 | $line = 1 unless defined($line); | ||||
101 | |||||
102 | return qq{#line $line "$description"\n}; | ||||
103 | } | ||||
104 | |||||
105 | # spent 35.2ms (2.59+32.6) within Eval::Closure::_clean_eval_closure which was called 158 times, avg 223µs/call:
# 158 times (2.59ms+32.6ms) by Eval::Closure::eval_closure at line 37, avg 223µs/call | ||||
106 | 158 | 90µs | my ($source, $captures, $alias) = @_; | ||
107 | |||||
108 | 158 | 474µs | 158 | 88µs | my @capture_keys = sort keys %$captures; # spent 88µs making 158 calls to Eval::Closure::CORE:sort, avg 556ns/call |
109 | |||||
110 | 158 | 86µs | if ($ENV{EVAL_CLOSURE_PRINT_SOURCE}) { | ||
111 | _dump_source(_make_compiler_source($source, $alias, @capture_keys)); | ||||
112 | } | ||||
113 | |||||
114 | 158 | 354µs | 158 | 31.9ms | my ($compiler, $e) = _make_compiler($source, $alias, @capture_keys); # spent 31.9ms making 158 calls to Eval::Closure::_make_compiler, avg 202µs/call |
115 | 158 | 16µs | my $code; | ||
116 | 158 | 395µs | 158 | 630µs | if (defined $compiler) { # spent 9µs making 1 call to Eval::Closure::Sandbox_21::__ANON__[(eval 90)[Eval/Closure.pm:144]:58]
# spent 8µs making 1 call to Eval::Closure::Sandbox_155::__ANON__[(eval 442)[Eval/Closure.pm:144]:45]
# spent 7µs making 1 call to Eval::Closure::Sandbox_115::__ANON__[(eval 202)[Eval/Closure.pm:144]:9]
# spent 7µs making 1 call to Eval::Closure::Sandbox_146::__ANON__[(eval 233)[Eval/Closure.pm:144]:9]
# spent 7µs making 1 call to Eval::Closure::Sandbox_103::__ANON__[(eval 190)[Eval/Closure.pm:144]:133]
# spent 7µs making 1 call to Eval::Closure::Sandbox_118::__ANON__[(eval 205)[Eval/Closure.pm:144]:142]
# spent 7µs making 1 call to Eval::Closure::Sandbox_122::__ANON__[(eval 209)[Eval/Closure.pm:144]:9]
# spent 6µs making 1 call to Eval::Closure::Sandbox_109::__ANON__[(eval 196)[Eval/Closure.pm:144]:100]
# spent 6µs making 1 call to Eval::Closure::Sandbox_70::__ANON__[(eval 157)[Eval/Closure.pm:144]:100]
# spent 6µs making 1 call to Eval::Closure::Sandbox_77::__ANON__[(eval 164)[Eval/Closure.pm:144]:106]
# spent 6µs making 1 call to Eval::Closure::Sandbox_40::__ANON__[(eval 109)[Eval/Closure.pm:144]:55]
# spent 6µs making 1 call to Eval::Closure::Sandbox_85::__ANON__[(eval 172)[Eval/Closure.pm:144]:46]
# spent 5µs making 1 call to Eval::Closure::Sandbox_19::__ANON__[(eval 88)[Eval/Closure.pm:144]:52]
# spent 5µs making 1 call to Eval::Closure::Sandbox_31::__ANON__[(eval 100)[Eval/Closure.pm:144]:58]
# spent 5µs making 1 call to Eval::Closure::Sandbox_35::__ANON__[(eval 104)[Eval/Closure.pm:144]:55]
# spent 5µs making 1 call to Eval::Closure::Sandbox_84::__ANON__[(eval 171)[Eval/Closure.pm:144]:28]
# spent 5µs making 1 call to Eval::Closure::Sandbox_26::__ANON__[(eval 95)[Eval/Closure.pm:144]:58]
# spent 5µs making 1 call to Eval::Closure::Sandbox_33::__ANON__[(eval 102)[Eval/Closure.pm:144]:55]
# spent 5µs making 1 call to Eval::Closure::Sandbox_38::__ANON__[(eval 107)[Eval/Closure.pm:144]:58]
# spent 5µs making 1 call to Eval::Closure::Sandbox_82::__ANON__[(eval 169)[Eval/Closure.pm:144]:27]
# spent 5µs making 1 call to Eval::Closure::Sandbox_110::__ANON__[(eval 197)[Eval/Closure.pm:144]:28]
# spent 5µs making 1 call to Eval::Closure::Sandbox_121::__ANON__[(eval 208)[Eval/Closure.pm:144]:25]
# spent 5µs making 1 call to Eval::Closure::Sandbox_126::__ANON__[(eval 213)[Eval/Closure.pm:144]:31]
# spent 5µs making 1 call to Eval::Closure::Sandbox_129::__ANON__[(eval 216)[Eval/Closure.pm:144]:31]
# spent 5µs making 1 call to Eval::Closure::Sandbox_83::__ANON__[(eval 170)[Eval/Closure.pm:144]:27]
# spent 5µs making 1 call to Eval::Closure::Sandbox_86::__ANON__[(eval 173)[Eval/Closure.pm:144]:40]
# spent 5µs making 1 call to Eval::Closure::Sandbox_87::__ANON__[(eval 174)[Eval/Closure.pm:144]:28]
# spent 5µs making 1 call to Eval::Closure::Sandbox_154::__ANON__[(eval 441)[Eval/Closure.pm:144]:14]
# spent 5µs making 1 call to Eval::Closure::Sandbox_45::__ANON__[(eval 114)[Eval/Closure.pm:144]:22]
# spent 5µs making 1 call to Eval::Closure::Sandbox_78::__ANON__[(eval 165)[Eval/Closure.pm:144]:25]
# spent 5µs making 1 call to Eval::Closure::Sandbox_123::__ANON__[(eval 210)[Eval/Closure.pm:144]:31]
# spent 5µs making 1 call to Eval::Closure::Sandbox_127::__ANON__[(eval 214)[Eval/Closure.pm:144]:25]
# spent 5µs making 1 call to Eval::Closure::Sandbox_88::__ANON__[(eval 175)[Eval/Closure.pm:144]:28]
# spent 4µs making 1 call to Eval::Closure::Sandbox_114::__ANON__[(eval 201)[Eval/Closure.pm:144]:19]
# spent 4µs making 1 call to Eval::Closure::Sandbox_79::__ANON__[(eval 166)[Eval/Closure.pm:144]:10]
# spent 4µs making 1 call to Eval::Closure::Sandbox_112::__ANON__[(eval 199)[Eval/Closure.pm:144]:16]
# spent 4µs making 1 call to Eval::Closure::Sandbox_67::__ANON__[(eval 139)[Eval/Closure.pm:144]:10]
# spent 4µs making 1 call to Eval::Closure::Sandbox_76::__ANON__[(eval 163)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_91::__ANON__[(eval 178)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_147::__ANON__[(eval 234)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_17::__ANON__[(eval 86)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_2::__ANON__[(eval 71)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_37::__ANON__[(eval 106)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_104::__ANON__[(eval 191)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_11::__ANON__[(eval 80)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_13::__ANON__[(eval 82)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_148::__ANON__[(eval 235)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_151::__ANON__[(eval 432)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_22::__ANON__[(eval 91)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_30::__ANON__[(eval 99)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_32::__ANON__[(eval 101)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_36::__ANON__[(eval 105)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_89::__ANON__[(eval 176)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_98::__ANON__[(eval 185)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_10::__ANON__[(eval 79)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_117::__ANON__[(eval 204)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_119::__ANON__[(eval 206)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_130::__ANON__[(eval 217)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_138::__ANON__[(eval 225)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_150::__ANON__[(eval 431)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_152::__ANON__[(eval 433)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_153::__ANON__[(eval 434)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_157::__ANON__[(eval 445)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_158::__ANON__[(eval 446)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_15::__ANON__[(eval 84)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_24::__ANON__[(eval 93)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_25::__ANON__[(eval 94)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_34::__ANON__[(eval 103)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_39::__ANON__[(eval 108)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_5::__ANON__[(eval 74)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_95::__ANON__[(eval 182)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_102::__ANON__[(eval 189)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_106::__ANON__[(eval 193)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_107::__ANON__[(eval 194)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_120::__ANON__[(eval 207)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_124::__ANON__[(eval 211)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_125::__ANON__[(eval 212)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_131::__ANON__[(eval 218)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_133::__ANON__[(eval 220)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_142::__ANON__[(eval 229)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_144::__ANON__[(eval 231)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_145::__ANON__[(eval 232)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_149::__ANON__[(eval 236)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_156::__ANON__[(eval 443)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_44::__ANON__[(eval 113)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_53::__ANON__[(eval 122)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_55::__ANON__[(eval 124)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_68::__ANON__[(eval 155)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_71::__ANON__[(eval 158)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_7::__ANON__[(eval 76)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_80::__ANON__[(eval 167)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_81::__ANON__[(eval 168)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_99::__ANON__[(eval 186)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_9::__ANON__[(eval 78)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_100::__ANON__[(eval 187)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_101::__ANON__[(eval 188)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_105::__ANON__[(eval 192)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_113::__ANON__[(eval 200)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_128::__ANON__[(eval 215)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_132::__ANON__[(eval 219)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_134::__ANON__[(eval 221)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_136::__ANON__[(eval 223)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_139::__ANON__[(eval 226)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_140::__ANON__[(eval 227)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_141::__ANON__[(eval 228)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_14::__ANON__[(eval 83)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_20::__ANON__[(eval 89)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_23::__ANON__[(eval 92)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_27::__ANON__[(eval 96)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_28::__ANON__[(eval 97)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_29::__ANON__[(eval 98)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_3::__ANON__[(eval 72)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_42::__ANON__[(eval 111)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_4::__ANON__[(eval 73)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_59::__ANON__[(eval 128)[Eval/Closure.pm:144]:4]
# spent 4µs making 1 call to Eval::Closure::Sandbox_6::__ANON__[(eval 75)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_72::__ANON__[(eval 159)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_73::__ANON__[(eval 160)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_74::__ANON__[(eval 161)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_75::__ANON__[(eval 162)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_8::__ANON__[(eval 77)[Eval/Closure.pm:144]:6]
# spent 4µs making 1 call to Eval::Closure::Sandbox_93::__ANON__[(eval 180)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_94::__ANON__[(eval 181)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_96::__ANON__[(eval 183)[Eval/Closure.pm:144]:9]
# spent 4µs making 1 call to Eval::Closure::Sandbox_97::__ANON__[(eval 184)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_108::__ANON__[(eval 195)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_111::__ANON__[(eval 198)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_12::__ANON__[(eval 81)[Eval/Closure.pm:144]:6]
# spent 3µs making 1 call to Eval::Closure::Sandbox_135::__ANON__[(eval 222)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_137::__ANON__[(eval 224)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_143::__ANON__[(eval 230)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_16::__ANON__[(eval 85)[Eval/Closure.pm:144]:6]
# spent 3µs making 1 call to Eval::Closure::Sandbox_18::__ANON__[(eval 87)[Eval/Closure.pm:144]:6]
# spent 3µs making 1 call to Eval::Closure::Sandbox_41::__ANON__[(eval 110)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_43::__ANON__[(eval 112)[Eval/Closure.pm:144]:6]
# spent 3µs making 1 call to Eval::Closure::Sandbox_50::__ANON__[(eval 119)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_57::__ANON__[(eval 126)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_60::__ANON__[(eval 129)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_62::__ANON__[(eval 131)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_63::__ANON__[(eval 132)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_90::__ANON__[(eval 177)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_92::__ANON__[(eval 179)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_1::__ANON__[(eval 70)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_61::__ANON__[(eval 130)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_69::__ANON__[(eval 156)[Eval/Closure.pm:144]:6]
# spent 3µs making 1 call to Eval::Closure::Sandbox_116::__ANON__[(eval 203)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_65::__ANON__[(eval 134)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_47::__ANON__[(eval 116)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_48::__ANON__[(eval 117)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_58::__ANON__[(eval 127)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_51::__ANON__[(eval 120)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_54::__ANON__[(eval 123)[Eval/Closure.pm:144]:9]
# spent 3µs making 1 call to Eval::Closure::Sandbox_56::__ANON__[(eval 125)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_49::__ANON__[(eval 118)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_52::__ANON__[(eval 121)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_64::__ANON__[(eval 133)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_46::__ANON__[(eval 115)[Eval/Closure.pm:144]:4]
# spent 3µs making 1 call to Eval::Closure::Sandbox_66::__ANON__[(eval 135)[Eval/Closure.pm:144]:4] |
117 | $code = $compiler->(@$captures{@capture_keys}); | ||||
118 | } | ||||
119 | |||||
120 | 158 | 147µs | if (defined($code) && (!ref($code) || ref($code) ne 'CODE')) { | ||
121 | $e = "The 'source' parameter must return a subroutine reference, " | ||||
122 | . "not $code"; | ||||
123 | undef $code; | ||||
124 | } | ||||
125 | |||||
126 | 158 | 16µs | if ($alias) { | ||
127 | require Devel::LexAlias; | ||||
128 | Devel::LexAlias::lexalias($code, $_, $captures->{$_}) | ||||
129 | for grep !/^\&/, keys %$captures; | ||||
130 | } | ||||
131 | |||||
132 | 158 | 489µs | return ($code, $e); | ||
133 | } | ||||
134 | |||||
135 | # spent 31.9ms (1.37+30.5) within Eval::Closure::_make_compiler which was called 158 times, avg 202µs/call:
# 158 times (1.37ms+30.5ms) by Eval::Closure::_clean_eval_closure at line 114, avg 202µs/call | ||||
136 | 158 | 207µs | 158 | 5.67ms | my $source = _make_compiler_source(@_); # spent 5.67ms making 158 calls to Eval::Closure::_make_compiler_source, avg 36µs/call |
137 | |||||
138 | 158 | 610µs | 158 | 24.8ms | return @{ _clean_eval($source) }; # spent 24.8ms making 158 calls to Eval::Closure::_clean_eval, avg 157µs/call |
139 | } | ||||
140 | |||||
141 | # spent 24.8ms within Eval::Closure::_clean_eval which was called 158 times, avg 157µs/call:
# 158 times (24.8ms+0s) by Eval::Closure::_make_compiler at line 138, avg 157µs/call | ||||
142 | 158 | 31µs | local $@; | ||
143 | 158 | 304µs | local $SIG{__DIE__}; | ||
144 | 158 | 22.8ms | my $compiler = eval $_[0]; # spent 384µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 365µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 322µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 309µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 224µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 184µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 184µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 174µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 150µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 136µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 116µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 111µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 93µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 91µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 83µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 81µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 63µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 59µs executing statements in string eval # includes 6µs spent executing 1 call to 2 subs defined therein. # spent 56µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 54µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 43µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 43µs executing statements in string eval # includes 7µs spent executing 1 call to 2 subs defined therein. # spent 42µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 36µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 33µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 30µs executing statements in string eval # includes 8µs spent executing 1 call to 2 subs defined therein. # spent 29µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 24µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 23µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 23µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 23µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 22µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 22µs executing statements in string eval # includes 9µs spent executing 1 call to 2 subs defined therein. # spent 19µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 18µs executing statements in string eval # includes 7µs spent executing 1 call to 2 subs defined therein. # spent 18µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 18µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 18µs executing statements in string eval # includes 6µs spent executing 1 call to 2 subs defined therein. # spent 17µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 17µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 6µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 5µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 7µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 16µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 7µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 15µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 14µs executing statements in string eval # includes 4µs spent executing 1 call to 2 subs defined therein. # spent 14µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 14µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 14µs executing statements in string eval # includes 6µs spent executing 1 call to 2 subs defined therein. # spent 14µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 14µs executing statements in string eval # includes 6µs spent executing 1 call to 2 subs defined therein. # spent 14µs executing statements in string eval # includes 3µs spent executing 1 call to 2 subs defined therein. # spent 13µ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 5µs spent executing 1 call to 2 subs defined therein. # spent 13µ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 5µ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 5µs spent executing 1 call to 2 subs defined therein. # spent 13µ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 5µ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 4µs spent executing 1 call to 2 subs defined therein. # spent 13µ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 5µs spent executing 1 call to 2 subs defined therein. # spent 12µs executing statements in string eval # includes 5µ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 7µ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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 3µs spent executing 1 call to 2 subs defined therein. | ||
145 | 158 | 37µs | my $e = $@; | ||
146 | 158 | 1.11ms | [ $compiler, $e ]; | ||
147 | } | ||||
148 | |||||
149 | 1 | 200ns | $Eval::Closure::SANDBOX_ID = 0; | ||
150 | |||||
151 | # spent 5.67ms (5.50+169µs) within Eval::Closure::_make_compiler_source which was called 158 times, avg 36µs/call:
# 158 times (5.50ms+169µs) by Eval::Closure::_make_compiler at line 136, avg 36µs/call | ||||
152 | 158 | 79µs | my ($source, $alias, @capture_keys) = @_; | ||
153 | 158 | 33µs | $Eval::Closure::SANDBOX_ID++; | ||
154 | 158 | 26µs | my $i = 0; | ||
155 | 40 | 46µs | 40 | 170µs | return join "\n", ( # spent 170µs making 40 calls to Eval::Closure::_make_lexical_assignment, avg 4µs/call |
156 | "package Eval::Closure::Sandbox_$Eval::Closure::SANDBOX_ID;", | ||||
157 | 'sub {', | ||||
158 | 158 | 675µs | (map { _make_lexical_assignment($_, $i++, $alias) } @capture_keys), | ||
159 | $source, | ||||
160 | '}', | ||||
161 | ); | ||||
162 | } | ||||
163 | |||||
164 | # spent 170µs within Eval::Closure::_make_lexical_assignment which was called 40 times, avg 4µs/call:
# 40 times (170µs+0s) by Eval::Closure::_make_compiler_source at line 155, avg 4µs/call | ||||
165 | 40 | 9µs | my ($key, $index, $alias) = @_; | ||
166 | 40 | 28µs | my $sigil = substr($key, 0, 1); | ||
167 | 40 | 14µs | my $name = substr($key, 1); | ||
168 | 40 | 8µs | if (HAS_LEXICAL_SUBS && $sigil eq '&') { | ||
169 | my $tmpname = '$__' . $name . '__' . $index; | ||||
170 | return 'use feature "lexical_subs"; ' | ||||
171 | . 'no warnings "experimental::lexical_subs"; ' | ||||
172 | . 'my ' . $tmpname . ' = $_[' . $index . ']; ' | ||||
173 | . 'my sub ' . $name . ' { goto ' . $tmpname . ' }'; | ||||
174 | } | ||||
175 | 40 | 5µs | if ($alias) { | ||
176 | return 'my ' . $key . ';'; | ||||
177 | } | ||||
178 | else { | ||||
179 | 40 | 4.87ms | return 'my ' . $key . ' = ' . $sigil . '{$_[' . $index . ']};'; | ||
180 | } | ||||
181 | } | ||||
182 | |||||
183 | sub _dump_source { | ||||
184 | my ($source) = @_; | ||||
185 | |||||
186 | my $output; | ||||
187 | if (try { require Perl::Tidy }) { | ||||
188 | Perl::Tidy::perltidy( | ||||
189 | source => \$source, | ||||
190 | destination => \$output, | ||||
191 | argv => [], | ||||
192 | ); | ||||
193 | } | ||||
194 | else { | ||||
195 | $output = $source; | ||||
196 | } | ||||
197 | |||||
198 | warn "$output\n"; | ||||
199 | } | ||||
200 | |||||
201 | |||||
202 | 1 | 5µs | 1; | ||
203 | |||||
204 | __END__ | ||||
# spent 63µs within Eval::Closure::CORE:match which was called 40 times, avg 2µs/call:
# 40 times (63µs+0s) by Eval::Closure::_validate_env at line 85, avg 2µs/call | |||||
# spent 88µs within Eval::Closure::CORE:sort which was called 158 times, avg 556ns/call:
# 158 times (88µs+0s) by Eval::Closure::_clean_eval_closure at line 108, avg 556ns/call |