← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:40 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/Eval/Closure.pm
StatementsExecuted 5952 statements in 38.7ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1581124.8ms24.8msEval::Closure::::_clean_evalEval::Closure::_clean_eval
158115.50ms5.67msEval::Closure::::_make_compiler_sourceEval::Closure::_make_compiler_source
158112.59ms35.2msEval::Closure::::_clean_eval_closureEval::Closure::_clean_eval_closure
158222.41ms39.8msEval::Closure::::eval_closureEval::Closure::eval_closure
158111.37ms31.9msEval::Closure::::_make_compilerEval::Closure::_make_compiler
15811970µs1.12msEval::Closure::::_validate_envEval::Closure::_validate_env
15811945µs1.05msEval::Closure::::_canonicalize_sourceEval::Closure::_canonicalize_source
4011170µs170µsEval::Closure::::_make_lexical_assignmentEval::Closure::_make_lexical_assignment
1581188µs88µsEval::Closure::::CORE:sortEval::Closure::CORE:sort (opcode)
401163µs63µsEval::Closure::::CORE:matchEval::Closure::CORE:match (opcode)
11115µs57µsEval::Closure::::BEGIN@20Eval::Closure::BEGIN@20
11115µs24µsEval::Closure::::BEGIN@12Eval::Closure::BEGIN@12
11110µs10µsEval::Closure::::BEGIN@2Eval::Closure::BEGIN@2
11110µs51µsEval::Closure::::BEGIN@15Eval::Closure::BEGIN@15
1119µs48µsEval::Closure::::BEGIN@18Eval::Closure::BEGIN@18
1119µs24µsEval::Closure::::BEGIN@8Eval::Closure::BEGIN@8
1119µs13µsEval::Closure::::BEGIN@9Eval::Closure::BEGIN@9
1118µs35µsEval::Closure::::BEGIN@17Eval::Closure::BEGIN@17
1114µs4µsEval::Closure::::BEGIN@16Eval::Closure::BEGIN@16
0000s0sEval::Closure::::__ANON__[:187]Eval::Closure::__ANON__[:187]
0000s0sEval::Closure::::_dump_sourceEval::Closure::_dump_source
0000s0sEval::Closure::::_line_directiveEval::Closure::_line_directive
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package 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
BEGIN {
316µs $Eval::Closure::AUTHORITY = 'cpan:DOY';
4142µs110µs}
# spent 10µs making 1 call to Eval::Closure::BEGIN@2
5{
621µs $Eval::Closure::VERSION = '0.11';
7}
8230µs240µ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
use strict;
# spent 24µs making 1 call to Eval::Closure::BEGIN@8 # spent 16µs making 1 call to strict::import
9232µs218µ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
use warnings;
# 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
12250µs233µ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
use Exporter 'import';
# spent 24µs making 1 call to Eval::Closure::BEGIN@12 # spent 9µs making 1 call to Exporter::import
1312µs@Eval::Closure::EXPORT = @Eval::Closure::EXPORT_OK = 'eval_closure';
14
15230µs292µ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
use Carp;
# spent 51µs making 1 call to Eval::Closure::BEGIN@15 # spent 41µs making 1 call to Exporter::import
16229µs14µ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
use overload ();
# spent 4µs making 1 call to Eval::Closure::BEGIN@16
17229µs262µ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
use Scalar::Util qw(reftype);
# spent 35µs making 1 call to Eval::Closure::BEGIN@17 # spent 27µs making 1 call to Exporter::import
18238µs288µ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
use Try::Tiny;
# spent 48µs making 1 call to Eval::Closure::BEGIN@18 # spent 39µs making 1 call to Exporter::import
19
2021.22ms299µ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
use constant HAS_LEXICAL_SUBS => $] >= 5.018;
# 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
sub eval_closure {
25158239µs my (%args) = @_;
26
27 # default to copying environment
28158118µs $args{alias} = 0 if !exists $args{alias};
29
30158238µs1581.05ms $args{source} = _canonicalize_source($args{source});
# spent 1.05ms making 158 calls to Eval::Closure::_canonicalize_source, avg 7µs/call
31158226µs1581.12ms _validate_env($args{environment} ||= {});
# spent 1.12ms making 158 calls to Eval::Closure::_validate_env, avg 7µs/call
32
33158157µs $args{source} = _line_directive(@args{qw(line description)})
34 . $args{source}
35 if defined $args{description} && !($^P & 0x10);
36
37158344µs15835.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
3915832µ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
48158520µ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
sub _canonicalize_source {
5215837µs my ($source) = @_;
53
5415835µs if (defined($source)) {
5515852µs if (ref($source)) {
561291.02ms129108µ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 {
692978µ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
sub _validate_env {
7815836µs my ($env) = @_;
79
80158401µs15886µ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
83158548µs for my $var (keys %$env) {
84404µs if (HAS_LEXICAL_SUBS) {
8540143µs4063µ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 }
924048µs croak("Environment values must be references, not $env->{$var}")
93 unless ref($env->{$var});
94 }
95}
96
97sub _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
sub _clean_eval_closure {
10615890µs my ($source, $captures, $alias) = @_;
107
108158474µs15888µs my @capture_keys = sort keys %$captures;
# spent 88µs making 158 calls to Eval::Closure::CORE:sort, avg 556ns/call
109
11015886µs if ($ENV{EVAL_CLOSURE_PRINT_SOURCE}) {
111 _dump_source(_make_compiler_source($source, $alias, @capture_keys));
112 }
113
114158354µs15831.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
11515816µs my $code;
116158395µs158630µ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
120158147µ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
12615816µs if ($alias) {
127 require Devel::LexAlias;
128 Devel::LexAlias::lexalias($code, $_, $captures->{$_})
129 for grep !/^\&/, keys %$captures;
130 }
131
132158489µ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
sub _make_compiler {
136158207µs1585.67ms my $source = _make_compiler_source(@_);
# spent 5.67ms making 158 calls to Eval::Closure::_make_compiler_source, avg 36µs/call
137
138158610µs15824.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
sub _clean_eval {
14215831µs local $@;
143158304µs local $SIG{__DIE__};
14415822.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.
14515837µs my $e = $@;
1461581.11ms [ $compiler, $e ];
147}
148
1491200ns$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
sub _make_compiler_source {
15215879µs my ($source, $alias, @capture_keys) = @_;
15315833µs $Eval::Closure::SANDBOX_ID++;
15415826µs my $i = 0;
1554046µs40170µ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 {',
158158675µ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
sub _make_lexical_assignment {
165409µs my ($key, $index, $alias) = @_;
1664028µs my $sigil = substr($key, 0, 1);
1674014µs my $name = substr($key, 1);
168408µ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 }
175405µs if ($alias) {
176 return 'my ' . $key . ';';
177 }
178 else {
179404.87ms return 'my ' . $key . ' = ' . $sigil . '{$_[' . $index . ']};';
180 }
181}
182
183sub _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
20215µs1;
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
sub Eval::Closure::CORE:match; # opcode
# 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
sub Eval::Closure::CORE:sort; # opcode