← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 22:00:36 2010
Reported on Wed Nov 17 22:09:57 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Eval/Closure.pm
StatementsExecuted 10665 statements in 300ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
27611187ms198msEval::Closure::::_make_compilerEval::Closure::_make_compiler
2961130.0ms351msEval::Closure::::eval_closureEval::Closure::eval_closure
2961128.4ms275msEval::Closure::::_clean_eval_closureEval::Closure::_clean_eval_closure
2961119.8ms27.1msEval::Closure::::_validate_envEval::Closure::_validate_env
2961112.8ms14.7msEval::Closure::::_canonicalize_sourceEval::Closure::_canonicalize_source
2761110.4ms10.4msEval::Closure::::_make_compiler_sourceEval::Closure::_make_compiler_source
1118.78ms12.6msEval::Closure::::BEGIN@7Eval::Closure::BEGIN@7
1117.04ms8.66msEval::Closure::::BEGIN@15Eval::Closure::BEGIN@15
296114.50ms4.50msEval::Closure::::_line_directiveEval::Closure::_line_directive
11156µs56µsEval::Closure::::BEGIN@2Eval::Closure::BEGIN@2
11142µs245µsEval::Closure::::BEGIN@13Eval::Closure::BEGIN@13
11140µs209µsEval::Closure::::BEGIN@17Eval::Closure::BEGIN@17
11140µs177µsEval::Closure::::BEGIN@16Eval::Closure::BEGIN@16
11139µs105µsEval::Closure::::BEGIN@6Eval::Closure::BEGIN@6
11137µs54µsEval::Closure::::BEGIN@5Eval::Closure::BEGIN@5
11120µs20µsEval::Closure::::BEGIN@14Eval::Closure::BEGIN@14
0000s0sEval::Closure::::__ANON__[:133]Eval::Closure::__ANON__[:133]
0000s0sEval::Closure::::_dump_sourceEval::Closure::_dump_source
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 56µs within Eval::Closure::BEGIN@2 which was called: # once (56µs+0s) by Class::MOP::Method::Generated::BEGIN@8 at line 4
BEGIN {
3127µs $Eval::Closure::VERSION = '0.01';
4171µs156µs}
# spent 56µs making 1 call to Eval::Closure::BEGIN@2
5388µs270µs
# spent 54µs (37+17) within Eval::Closure::BEGIN@5 which was called: # once (37µs+17µs) by Class::MOP::Method::Generated::BEGIN@8 at line 5
use strict;
# spent 54µs making 1 call to Eval::Closure::BEGIN@5 # spent 17µs making 1 call to strict::import
63157µs2172µs
# spent 105µs (39+66) within Eval::Closure::BEGIN@6 which was called: # once (39µs+66µs) by Class::MOP::Method::Generated::BEGIN@8 at line 6
use warnings;
# spent 105µs making 1 call to Eval::Closure::BEGIN@6 # spent 66µs making 1 call to warnings::import
711.77ms
# spent 12.6ms (8.78+3.86) within Eval::Closure::BEGIN@7 which was called: # once (8.78ms+3.86ms) by Class::MOP::Method::Generated::BEGIN@8 at line 10
use Sub::Exporter -setup => {
# spent 1.77ms making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756]
8 exports => [qw(eval_closure)],
9 groups => { default => [qw(eval_closure)] },
103665µs112.6ms};
# spent 12.6ms making 1 call to Eval::Closure::BEGIN@7
11# ABSTRACT: safely and cleanly create closures via string eval
12
133100µs2447µs
# spent 245µs (42+203) within Eval::Closure::BEGIN@13 which was called: # once (42µs+203µs) by Class::MOP::Method::Generated::BEGIN@8 at line 13
use Carp;
# spent 245µs making 1 call to Eval::Closure::BEGIN@13 # spent 203µs making 1 call to Exporter::import
14379µs120µs
# spent 20µs within Eval::Closure::BEGIN@14 which was called: # once (20µs+0s) by Class::MOP::Method::Generated::BEGIN@8 at line 14
use overload ();
# spent 20µs making 1 call to Eval::Closure::BEGIN@14
153725µs28.83ms
# spent 8.66ms (7.04+1.62) within Eval::Closure::BEGIN@15 which was called: # once (7.04ms+1.62ms) by Class::MOP::Method::Generated::BEGIN@8 at line 15
use Memoize;
# spent 8.66ms making 1 call to Eval::Closure::BEGIN@15 # spent 168µs making 1 call to Exporter::import
163101µs2315µs
# spent 177µs (40+137) within Eval::Closure::BEGIN@16 which was called: # once (40µs+137µs) by Class::MOP::Method::Generated::BEGIN@8 at line 16
use Scalar::Util qw(reftype);
# spent 177µs making 1 call to Eval::Closure::BEGIN@16 # spent 137µs making 1 call to Exporter::import
1732.35ms2377µs
# spent 209µs (40+168) within Eval::Closure::BEGIN@17 which was called: # once (40µs+168µs) by Class::MOP::Method::Generated::BEGIN@8 at line 17
use Try::Tiny;
# spent 209µs making 1 call to Eval::Closure::BEGIN@17 # spent 168µs making 1 call to Exporter::import
18
- -
21
# spent 351ms (30.0+321) within Eval::Closure::eval_closure which was called 296 times, avg 1.19ms/call: # 296 times (30.0ms+321ms) by Class::MOP::Method::Generated::_compile_code at line 51 of Class/MOP/Method/Generated.pm, avg 1.19ms/call
sub eval_closure {
22207227.5ms my (%args) = @_;
23
2429614.7ms $args{source} = _canonicalize_source($args{source});
# spent 14.7ms making 296 calls to Eval::Closure::_canonicalize_source, avg 50µs/call
2529627.1ms _validate_env($args{environment} ||= {});
# spent 27.1ms making 296 calls to Eval::Closure::_validate_env, avg 92µs/call
26
272964.50ms $args{source} = _line_directive($args{description}) . $args{source}
# spent 4.50ms making 296 calls to Eval::Closure::_line_directive, avg 15µs/call
28 if defined $args{description};
29
30296275ms my ($code, $e) = _clean_eval_closure(@args{qw(source environment)});
# spent 275ms making 296 calls to Eval::Closure::_clean_eval_closure, avg 929µs/call
31
32 croak("Failed to compile source: $e\n\nsource:\n$args{source}")
33 unless $code;
34
35 return $code;
36}
37
38
# spent 14.7ms (12.8+1.89) within Eval::Closure::_canonicalize_source which was called 296 times, avg 50µs/call: # 296 times (12.8ms+1.89ms) by Eval::Closure::eval_closure at line 24, avg 50µs/call
sub _canonicalize_source {
39118415.4ms my ($source) = @_;
40
41 if (defined($source)) {
42 if (ref($source)) {
432961.89ms if (reftype($source) eq 'ARRAY'
# spent 1.89ms making 296 calls to Scalar::Util::reftype, avg 6µs/call
44 || overload::Method($source, '@{}')) {
45 return join "\n", @$source;
46 }
47 elsif (overload::Method($source, '""')) {
48 return "$source";
49 }
50 else {
51 croak("The 'source' parameter to eval_closure must be a "
52 . "string or array reference");
53 }
54 }
55 else {
56 return $source;
57 }
58 }
59 else {
60 croak("The 'source' parameter to eval_closure is required");
61 }
62}
63
64
# spent 27.1ms (19.8+7.33) within Eval::Closure::_validate_env which was called 296 times, avg 92µs/call: # 296 times (19.8ms+7.33ms) by Eval::Closure::eval_closure at line 25, avg 92µs/call
sub _validate_env {
65221427.7ms my ($env) = @_;
66
672961.49ms croak("The 'environment' parameter must be a hashref")
# spent 1.49ms making 296 calls to Scalar::Util::reftype, avg 5µs/call
68 unless reftype($env) eq 'HASH';
69
70 for my $var (keys %$env) {
716635.84ms croak("Environment key '$var' should start with \@, \%, or \$")
# spent 5.84ms making 663 calls to Eval::Closure::CORE:match, avg 9µs/call
72 unless $var =~ /^([\@\%\$])/;
73 croak("Environment values must be references, not $env->{$var}")
74 unless ref($env->{$var});
75 }
76}
77
78
# spent 4.50ms within Eval::Closure::_line_directive which was called 296 times, avg 15µs/call: # 296 times (4.50ms+0s) by Eval::Closure::eval_closure at line 27, avg 15µs/call
sub _line_directive {
795925.20ms my ($description) = @_;
80
81 return qq{#line 1 "$description"\n};
82}
83
84
# spent 275ms (28.4+247) within Eval::Closure::_clean_eval_closure which was called 296 times, avg 929µs/call: # 296 times (28.4ms+247ms) by Eval::Closure::eval_closure at line 30, avg 929µs/call
sub _clean_eval_closure {
85236825.2ms my ($source, $captures) = @_;
86
87 if ($ENV{EVAL_CLOSURE_PRINT_SOURCE}) {
88 _dump_source(_make_compiler_source(@_));
89 }
90
912961.66ms my @capture_keys = sort keys %$captures;
# spent 1.66ms making 296 calls to Eval::Closure::CORE:sort, avg 6µs/call
922966.34ms my ($compiler, $e) = _make_compiler($source, @capture_keys);
# spent 6.34ms making 296 calls to Memoize::__ANON__[(eval 30)[Memoize.pm:73]:1], avg 21µs/call
93 my $code;
942967.53ms if (defined $compiler) {
# spent 1.06ms making 71 calls to Eval::Closure::__ANON__[generated method (unknown origin):7], avg 15µs/call # spent 622µs making 39 calls to Eval::Closure::__ANON__[generated method (unknown origin):6], avg 16µs/call # spent 616µs making 15 calls to Eval::Closure::__ANON__[generated method (unknown origin):45], avg 41µs/call # spent 480µs making 14 calls to Eval::Closure::__ANON__[generated method (unknown origin):35], avg 34µs/call # spent 252µs making 5 calls to Eval::Closure::__ANON__[accessor _native_type (defined at Moose/Meta/Attribute/Native/Trait.pm line 191):23], avg 50µs/call # spent 235µs making 16 calls to Eval::Closure::__ANON__[generated method (unknown origin):4], avg 15µs/call # spent 189µs making 7 calls to Eval::Closure::__ANON__[generated method (unknown origin):40], avg 27µs/call # spent 154µs making 5 calls to Eval::Closure::__ANON__[accessor _used_default_is (defined at Moose/Meta/Attribute/Native/Trait.pm line 15):10], avg 31µs/call # spent 144µs making 3 calls to Eval::Closure::__ANON__[generated method (unknown origin):59], avg 48µs/call # spent 118µs making 4 calls to Eval::Closure::__ANON__[generated method (unknown origin):25], avg 29µs/call # spent 99µs making 1 call to Eval::Closure::__ANON__[accessor delimiter (defined at Markdent/Event/StartEmphasis.pm line 15):7] # spent 98µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):228] # spent 92µs making 3 calls to Eval::Closure::__ANON__[accessor debug (defined at Markdent/Role/DebugPrinter.pm line 14):10], avg 31µs/call # spent 90µs making 3 calls to Eval::Closure::__ANON__[accessor handler (defined at Markdent/Role/AnyParser.pm line 14):7], avg 30µs/call # spent 70µs making 2 calls to Eval::Closure::__ANON__[Markdent/Dialect/Standard/BlockParser.pm (line 50):10], avg 35µs/call # spent 68µs making 3 calls to Eval::Closure::__ANON__[generated method (unknown origin):28], avg 23µs/call # spent 65µs making 3 calls to Eval::Closure::__ANON__[generated method (unknown origin):22], avg 22µs/call # spent 63µs making 2 calls to Eval::Closure::__ANON__[Markdent/Dialect/Standard/BlockParser.pm (line 62):10], avg 31µs/call # spent 63µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):210] # spent 56µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):106] # spent 55µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):150] # spent 52µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):105] # spent 51µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):93] # spent 50µs making 2 calls to Eval::Closure::__ANON__[generated method (unknown origin):24], avg 25µs/call # spent 48µs making 2 calls to Eval::Closure::__ANON__[generated method (unknown origin):43], avg 24µs/call # spent 47µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):73] # spent 47µs making 2 calls to Eval::Closure::__ANON__[generated method (unknown origin):37], avg 23µs/call # spent 45µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):83] # spent 45µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):58] # spent 43µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/SpanParser.pm (line 69):25] # spent 42µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/BlockParser.pm (line 43):25] # spent 37µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/SpanParser.pm (line 43):12] # spent 37µs making 1 call to Eval::Closure::__ANON__[accessor level (defined at Markdent/Event/StartHeader.pm line 15):7] # spent 37µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/SpanParser.pm (line 43):9] # spent 36µs making 1 call to Eval::Closure::__ANON__[accessor text (defined at Markdent/Event/Text.pm line 15):7] # spent 34µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/SpanParser.pm (line 69):13] # spent 33µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):30] # spent 33µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/SpanParser.pm (line 51):13] # spent 32µs making 1 call to Eval::Closure::__ANON__[accessor id (defined at Markdent/Event/Image.pm line 33):7] # spent 32µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/SpanParser.pm (line 43):8] # spent 32µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/SpanParser.pm (line 51):8] # spent 32µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/BlockParser.pm (line 43):13] # spent 32µs making 1 call to Eval::Closure::__ANON__[accessor _set__pending_events of attribute __pending_events (defined at Markdent/Dialect/Standard/SpanParser.pm line 43):7] # spent 32µs making 1 call to Eval::Closure::__ANON__[Markdent/Dialect/Standard/SpanParser.pm (line 51):10] # spent 32µs making 1 call to Eval::Closure::__ANON__[accessor _output (defined at Markdent/Role/HTMLStream.pm line 24):7] # spent 31µs making 1 call to Eval::Closure::__ANON__[accessor _span_parser (defined at Markdent/Parser.pm line 57):23] # spent 31µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):139] # spent 31µs making 1 call to Eval::Closure::__ANON__[accessor _stream (defined at Markdent/Role/HTMLStream.pm line 37):14] # spent 30µs making 1 call to Eval::Closure::__ANON__[accessor _span_parser (defined at Markdent/Role/BlockParser.pm line 16):7] # spent 30µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):130] # spent 30µs making 1 call to Eval::Closure::__ANON__[accessor text (defined at Markdent/Event/HTMLCommentBlock.pm line 15):7] # spent 30µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):94] # spent 30µs making 1 call to Eval::Closure::__ANON__[accessor _block_parser (defined at Markdent/Parser.pm line 30):23] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor _list_level (defined at Markdent/Dialect/Standard/BlockParser.pm line 50):7] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor _escape_re (defined at Markdent/Dialect/Standard/SpanParser.pm line 76):23] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor tag (defined at Markdent/Event/StartHTMLTag.pm line 15):7] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor _escapable_chars (defined at Markdent/Dialect/Standard/SpanParser.pm line 84):23] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor text (defined at Markdent/Event/HTMLComment.pm line 15):7] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor _set_list_level of attribute _list_level (defined at Markdent/Dialect/Standard/BlockParser.pm line 50):7] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor delimiter (defined at Markdent/Event/EndCode.pm line 15):7] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor delimiter (defined at Markdent/Event/EndEmphasis.pm line 15):7] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor entity (defined at Markdent/Event/HTMLEntity.pm line 15):7] # spent 29µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):97] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor text (defined at Markdent/Event/Preformatted.pm line 15):7] # spent 29µs making 1 call to Eval::Closure::__ANON__[accessor uri (defined at Markdent/Event/StartLink.pm line 15):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor html (defined at Markdent/Event/HTMLBlock.pm line 15):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor parameters (defined at MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm line 14):10] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor delimiter (defined at Markdent/Event/StartCode.pm line 15):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor uri (defined at Markdent/Event/AutoLink.pm line 15):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor _converted_from (defined at Markdent/Event/Text.pm line 21):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor parameters_metaclass (defined at MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm line 32):17] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor tag (defined at Markdent/Event/HTMLTag.pm line 15):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):103] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor attributes (defined at Markdent/Event/StartHTMLTag.pm line 25):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor _set_block_parser_class of attribute _block_parser_class (defined at Markdent/Parser.pm line 23):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor _set_span_parser_args of attribute _span_parser_args (defined at Markdent/Parser.pm line 51):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor _span_text_buffer (defined at Markdent/Dialect/Standard/SpanParser.pm line 51):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor uri (defined at Markdent/Event/Image.pm line 15):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor delimiter (defined at Markdent/Event/StartStrong.pm line 15):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor title (defined at Markdent/Event/Image.pm line 27):7] # spent 28µs making 1 call to Eval::Closure::__ANON__[accessor _block_parser_class (defined at Markdent/Parser.pm line 23):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor _span_parser_args (defined at Markdent/Parser.pm line 51):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor alt_text (defined at Markdent/Event/Image.pm line 21):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor genitor (defined at MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm line 8):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor is_implicit_id (defined at Markdent/Event/Image.pm line 39):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor tag (defined at Markdent/Event/EndHTMLTag.pm line 15):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor _span_parser_class (defined at Markdent/Parser.pm line 44):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor delimiter (defined at Markdent/Event/EndStrong.pm line 15):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor _block_parser_args (defined at Markdent/Parser.pm line 38):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor _set_block_parser_args of attribute _block_parser_args (defined at Markdent/Parser.pm line 38):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor attributes (defined at Markdent/Event/HTMLTag.pm line 25):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor title (defined at Markdent/Handler/HTMLStream/Document.pm line 17):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor __pending_events (defined at Markdent/Dialect/Standard/SpanParser.pm line 43):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor parameters_class (defined at MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm line 14):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor _set_span_parser_class of attribute _span_parser_class (defined at Markdent/Parser.pm line 44):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor _merged_from (defined at Markdent/Event/Text.pm line 27):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor _links_by_id (defined at Markdent/Dialect/Standard/SpanParser.pm line 69):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor title (defined at Markdent/Event/StartLink.pm line 21):7] # spent 27µs making 1 call to Eval::Closure::__ANON__[accessor _list_item_is_paragraph (defined at Markdent/Dialect/Standard/BlockParser.pm line 62):7] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor __html_blocks (defined at Markdent/Dialect/Standard/BlockParser.pm line 43):7] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor level (defined at Markdent/Event/EndHeader.pm line 15):7] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor _has_merged_from of attribute _merged_from (defined at Markdent/Event/Text.pm line 27):4] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor id (defined at Markdent/Event/StartLink.pm line 27):7] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor role_generator (defined at MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm line 37):10] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor has_role_generator of attribute role_generator (defined at MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm line 37):4] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor has_title of attribute title (defined at Markdent/Event/StartLink.pm line 21):4] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor is_implicit_id (defined at Markdent/Event/StartLink.pm line 33):7] # spent 26µs making 1 call to Eval::Closure::__ANON__[accessor has_title of attribute title (defined at Markdent/Event/Image.pm line 27):4] # spent 25µs making 1 call to Eval::Closure::__ANON__[accessor has_id of attribute id (defined at Markdent/Event/StartLink.pm line 27):4] # spent 25µs making 1 call to Eval::Closure::__ANON__[accessor has_id of attribute id (defined at Markdent/Event/Image.pm line 33):4] # spent 25µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):16] # spent 25µs making 1 call to Eval::Closure::__ANON__[accessor _has_converted_from of attribute _converted_from (defined at Markdent/Event/Text.pm line 21):4] # spent 21µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):13] # spent 20µs making 1 call to Eval::Closure::__ANON__[generated method (unknown origin):19]
95 $code = $compiler->(@$captures{@capture_keys});
96 }
97
98 if (defined($code) && (!ref($code) || ref($code) ne 'CODE')) {
99 $e = "The 'source' parameter must return a subroutine reference, "
100 . "not $code";
101 undef $code;
102 }
103
104 return ($code, $e);
105}
106
107
# spent 198ms (187+10.4) within Eval::Closure::_make_compiler which was called 276 times, avg 716µs/call: # 276 times (187ms+10.4ms) by Memoize::_memoizer at line 269 of Memoize.pm, avg 716µs/call
sub _make_compiler {
1081380183ms local $@;
109 local $SIG{__DIE__};
11027610.4ms my $compiler = eval _make_compiler_source(@_);
# spent 10.4ms making 276 calls to Eval::Closure::_make_compiler_source, avg 38µs/call
# spent 61µs executing statements in string eval # spent 58µs executing statements in string eval # spent 55µs executing statements in string eval # spent 33µs executing statements in string eval # spent 33µs executing statements in string eval # spent 26µs executing statements in string eval # spent 25µs executing statements in string eval # spent 23µs executing statements in string eval # spent 23µs executing statements in string eval # spent 23µs executing statements in string eval # spent 22µs executing statements in string eval # spent 22µs executing statements in string eval # spent 20µs executing statements in string eval # spent 19µs executing statements in string eval # spent 19µs executing statements in string eval # spent 19µs executing statements in string eval # spent 18µs executing statements in string eval # spent 18µs executing statements in string eval # spent 18µs executing statements in string eval # spent 18µs executing statements in string eval # spent 18µs executing statements in string eval # spent 18µs executing statements in string eval # spent 16µs executing statements in string eval # spent 16µs executing statements in string eval # spent 16µs executing statements in string eval # spent 16µs executing statements in string eval # spent 16µs executing statements in string eval # spent 16µs executing statements in string eval # spent 16µs executing statements in string eval # spent 16µs executing statements in string eval # spent 15µs executing statements in string eval # spent 15µs executing statements in string eval # spent 15µs executing statements in string eval # spent 15µs executing statements in string eval # spent 15µs executing statements in string eval # spent 15µs executing statements in string eval # spent 14µs executing statements in string eval # spent 14µs executing statements in string eval # spent 14µs executing statements in string eval # spent 14µs executing statements in string eval # spent 14µs executing statements in string eval # spent 14µs executing statements in string eval # spent 14µs executing statements in string eval # spent 14µs executing statements in string eval # spent 14µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 13µs executing statements in string eval # spent 12µs executing statements in string eval # spent 12µs executing statements in string eval # spent 12µs executing statements in string eval # spent 12µs executing statements in string eval # spent 12µs executing statements in string eval # spent 12µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 11µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 10µs executing statements in string eval # spent 9µs executing statements in string eval # spent 9µs executing statements in string eval # spent 5µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 4µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval # spent 3µs executing statements in string eval
111 my $e = $@;
112 return ($compiler, $e);
113}
114115µs1880µsmemoize('_make_compiler');
# spent 880µs making 1 call to Memoize::memoize
115
116
# spent 10.4ms within Eval::Closure::_make_compiler_source which was called 276 times, avg 38µs/call: # 276 times (10.4ms+0s) by Eval::Closure::_make_compiler at line 110, avg 38µs/call
sub _make_compiler_source {
11782811.6ms my ($source, @capture_keys) = @_;
118 my $i = 0;
119 return join "\n", (
120 'sub {',
121 (map {
122 'my ' . $_ . ' = ' . substr($_, 0, 1) . '{$_[' . $i++ . ']};'
123 } @capture_keys),
124 $source,
125 '}',
126 );
127}
128
129sub _dump_source {
130 my ($source) = @_;
131
132 my $output;
133 if (try { require Perl::Tidy }) {
134 Perl::Tidy::perltidy(
135 source => \$source,
136 destination => \$output,
137 );
138 }
139 else {
140 $output = $source;
141 }
142
143 warn "$output\n";
144}
145
146
147112µs1;
148
149__END__