← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:45:08 2010
Reported on Wed Nov 17 22:10:52 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm
StatementsExecuted 38724 statements in 394ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1801181.5ms725msMoose::Exporter::::__ANON__[:125]Moose::Exporter::__ANON__[:125]
10081156.3ms110msMoose::Exporter::::__ANON__[:329]Moose::Exporter::__ANON__[:329]
751151.4ms52.4msMoose::Exporter::::_remove_keywordsMoose::Exporter::_remove_keywords
18017813143.2ms3.65sMoose::Exporter::::__ANON__[:456]Moose::Exporter::__ANON__[:456]
10081138.9ms38.9msMoose::Exporter::::_late_curry_wrapperMoose::Exporter::_late_curry_wrapper
180117.56ms10.8msMoose::Exporter::::_strip_traitsMoose::Exporter::_strip_traits
792117.09ms7.09msMoose::Exporter::::__ANON__[:259]Moose::Exporter::__ANON__[:259]
180115.93ms8.01msMoose::Exporter::::_strip_metaclassMoose::Exporter::_strip_metaclass
42115.72ms1.08sMoose::Exporter::::__ANON__[:643]Moose::Exporter::__ANON__[:643]
180115.57ms7.55msMoose::Exporter::::_strip_meta_nameMoose::Exporter::_strip_meta_name
217114.97ms13.0msMoose::Exporter::::__ANON__[:321]Moose::Exporter::__ANON__[:321]
7575743.55ms55.9msMoose::Exporter::::__ANON__[:557]Moose::Exporter::__ANON__[:557]
7113.41ms6.54msMoose::Exporter::::_make_sub_exporter_paramsMoose::Exporter::_make_sub_exporter_params
1113.40ms4.45msMoose::Exporter::::BEGIN@13Moose::Exporter::BEGIN@13
180112.95ms2.95msMoose::Exporter::::_get_callerMoose::Exporter::_get_caller
50112.34ms4.79msMoose::Exporter::::__ANON__[:307]Moose::Exporter::__ANON__[:307]
7111.88ms30.7msMoose::Exporter::::build_import_methodsMoose::Exporter::build_import_methods
66311.79ms1.79msMoose::Exporter::::_sub_from_packageMoose::Exporter::_sub_from_package
249111.74ms1.74msMoose::Exporter::::_flag_as_reexportMoose::Exporter::_flag_as_reexport (xsub)
50111.70ms1.73msMoose::Exporter::::_curry_wrapperMoose::Exporter::_curry_wrapper
14811942µs942µsMoose::Exporter::::_export_is_flaggedMoose::Exporter::_export_is_flagged (xsub)
2511720µs720µsMoose::Exporter::::_make_wrapped_subMoose::Exporter::_make_wrapped_sub
711693µs693µsMoose::Exporter::::_make_init_metaMoose::Exporter::_make_init_meta
711397µs633µsMoose::Exporter::::_follow_alsoMoose::Exporter::_follow_also
1611396µs396µsMoose::Exporter::::_make_wrapped_sub_with_metaMoose::Exporter::_make_wrapped_sub_with_meta
777380µs31.1msMoose::Exporter::::setup_import_methodsMoose::Exporter::setup_import_methods
777380µs1.01msMoose::Exporter::::importMoose::Exporter::import
711378µs13.5msMoose::Exporter::::_make_exporterMoose::Exporter::_make_exporter
711293µs293µsMoose::Exporter::::_make_import_subMoose::Exporter::_make_import_sub
711202µs202µsMoose::Exporter::::_make_unimport_subMoose::Exporter::_make_unimport_sub
711187µs187µsMoose::Exporter::::_parse_trait_aliasesMoose::Exporter::_parse_trait_aliases
711148µs148µsMoose::Exporter::::_follow_also_realMoose::Exporter::_follow_also_real
11174µs93µsMoose::Exporter::::BEGIN@3Moose::Exporter::BEGIN@3
11173µs1.33msMoose::Exporter::::BEGIN@15Moose::Exporter::BEGIN@15
11160µs153µsMoose::Exporter::::BEGIN@272Moose::Exporter::BEGIN@272
11156µs147µsMoose::Exporter::::BEGIN@567Moose::Exporter::BEGIN@567
11153µs257µsMoose::Exporter::::BEGIN@16Moose::Exporter::BEGIN@16
11148µs238µsMoose::Exporter::::BEGIN@12Moose::Exporter::BEGIN@12
11147µs125µsMoose::Exporter::::BEGIN@577Moose::Exporter::BEGIN@577
11147µs124µsMoose::Exporter::::BEGIN@120Moose::Exporter::BEGIN@120
11145µs114µsMoose::Exporter::::BEGIN@121Moose::Exporter::BEGIN@121
11142µs205µsMoose::Exporter::::BEGIN@14Moose::Exporter::BEGIN@14
11138µs105µsMoose::Exporter::::BEGIN@4Moose::Exporter::BEGIN@4
11138µs38µsMoose::Exporter::::BEGIN@11Moose::Exporter::BEGIN@11
11129µs29µsMoose::Exporter::::BEGIN@18Moose::Exporter::BEGIN@18
0000s0sMoose::Exporter::::__ANON__[:189]Moose::Exporter::__ANON__[:189]
0000s0sMoose::Exporter::::__ANON__[:338]Moose::Exporter::__ANON__[:338]
0000s0sMoose::Exporter::::__ANON__[:360]Moose::Exporter::__ANON__[:360]
0000s0sMoose::Exporter::::__ANON__[:460]Moose::Exporter::__ANON__[:460]
0000s0sMoose::Exporter::::__ANON__[:474]Moose::Exporter::__ANON__[:474]
0000s0sMoose::Exporter::::__ANON__[:486]Moose::Exporter::__ANON__[:486]
0000s0sMoose::Exporter::::_apply_meta_traitsMoose::Exporter::_apply_meta_traits
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Exporter;
2
33100µs2111µs
# spent 93µs (74+18) within Moose::Exporter::BEGIN@3 which was called: # once (74µs+18µs) by Moose::BEGIN@15 at line 3
use strict;
# spent 93µs making 1 call to Moose::Exporter::BEGIN@3 # spent 18µs making 1 call to strict::import
43224µs2173µs
# spent 105µs (38+67) within Moose::Exporter::BEGIN@4 which was called: # once (38µs+67µs) by Moose::BEGIN@15 at line 4
use warnings;
# spent 105µs making 1 call to Moose::Exporter::BEGIN@4 # spent 67µs making 1 call to warnings::import
5
615µsour $VERSION = '1.19';
713µsour $XS_VERSION = $VERSION;
8185µs$VERSION = eval $VERSION;
# spent 13µs executing statements in string eval
913µsour $AUTHORITY = 'cpan:STEVAN';
10
113136µs138µs
# spent 38µs within Moose::Exporter::BEGIN@11 which was called: # once (38µs+0s) by Moose::BEGIN@15 at line 11
use Class::MOP;
# spent 38µs making 1 call to Moose::Exporter::BEGIN@11
123101µs2430µs
# spent 238µs (48+191) within Moose::Exporter::BEGIN@12 which was called: # once (48µs+191µs) by Moose::BEGIN@15 at line 12
use List::MoreUtils qw( first_index uniq );
# spent 238µs making 1 call to Moose::Exporter::BEGIN@12 # spent 191µs making 1 call to Exporter::import
133478µs14.45ms
# spent 4.45ms (3.40+1.04) within Moose::Exporter::BEGIN@13 which was called: # once (3.40ms+1.04ms) by Moose::BEGIN@15 at line 13
use Moose::Util::MetaRole;
# spent 4.45ms making 1 call to Moose::Exporter::BEGIN@13
143110µs2369µs
# spent 205µs (42+163) within Moose::Exporter::BEGIN@14 which was called: # once (42µs+163µs) by Moose::BEGIN@15 at line 14
use Scalar::Util qw(reftype);
# spent 205µs making 1 call to Moose::Exporter::BEGIN@14 # spent 164µs making 1 call to Exporter::import
153447µs32.59ms
# spent 1.33ms (73µs+1.26) within Moose::Exporter::BEGIN@15 which was called: # once (73µs+1.26ms) by Moose::BEGIN@15 at line 15
use Sub::Exporter 0.980;
# spent 1.33ms making 1 call to Moose::Exporter::BEGIN@15 # spent 1.19ms making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756] # spent 65µs making 1 call to UNIVERSAL::VERSION
163141µs2461µs
# spent 257µs (53+204) within Moose::Exporter::BEGIN@16 which was called: # once (53µs+204µs) by Moose::BEGIN@15 at line 16
use Sub::Name qw(subname);
# spent 257µs making 1 call to Moose::Exporter::BEGIN@16 # spent 204µs making 1 call to Exporter::import
17
1832.59ms129µs
# spent 29µs within Moose::Exporter::BEGIN@18 which was called: # once (29µs+0s) by Moose::BEGIN@15 at line 18
use XSLoader;
# spent 29µs making 1 call to Moose::Exporter::BEGIN@18
19
201375µs1340µsXSLoader::load( 'Moose', $XS_VERSION );
# spent 340µs making 1 call to XSLoader::load
21
2213µsmy %EXPORT_SPEC;
23
24
# spent 31.1ms (380µs+30.7) within Moose::Exporter::setup_import_methods which was called 7 times, avg 4.44ms/call: # once (54µs+5.85ms) by Markdent::Role::Event::BEGIN@10 at line 13 of MooseX/Role/Parameterized.pm # once (62µs+5.70ms) by Moose::Meta::Attribute::BEGIN@20 at line 42 of Moose/Util/TypeConstraints.pm # once (55µs+5.07ms) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 88 of Moose/Role.pm # once (56µs+4.69ms) by MooseX::Types::BEGIN@2 at line 122 of Moose.pm # once (50µs+4.34ms) by MooseX::Types::BEGIN@15 at line 68 of MooseX/Types/CheckedUtilExports.pm # once (52µs+2.55ms) by Markdent::Handler::HTMLStream::Document::BEGIN@13 at line 14 of MooseX/SemiAffordanceAccessor.pm # once (51µs+2.51ms) by Markdent::Event::StartDocument::BEGIN@11 at line 15 of MooseX/StrictConstructor.pm
sub setup_import_methods {
2521390µs my ( $class, %args ) = @_;
26
27 my $exporting_package = $args{exporting_package} ||= caller();
28
29730.7ms $class->build_import_methods(
# spent 30.7ms making 7 calls to Moose::Exporter::build_import_methods, avg 4.39ms/call
30 %args,
31 install => [qw(import unimport init_meta)]
32 );
33}
34
35
# spent 30.7ms (1.88+28.8) within Moose::Exporter::build_import_methods which was called 7 times, avg 4.39ms/call: # 7 times (1.88ms+28.8ms) by Moose::Exporter::setup_import_methods at line 29, avg 4.39ms/call
sub build_import_methods {
361051.14ms my ( $class, %args ) = @_;
37
38 my $exporting_package = $args{exporting_package} ||= caller();
39
40 $EXPORT_SPEC{$exporting_package} = \%args;
41
427633µs my @exports_from = $class->_follow_also($exporting_package);
# spent 633µs making 7 calls to Moose::Exporter::_follow_also, avg 90µs/call
43
44 my $export_recorder = {};
45 my $is_reexport = {};
46
4776.54ms my $exports = $class->_make_sub_exporter_params(
# spent 6.54ms making 7 calls to Moose::Exporter::_make_sub_exporter_params, avg 934µs/call
48 [ @exports_from, $exporting_package ],
49 $export_recorder,
50 $is_reexport,
51 );
52
53713.5ms my $exporter = $class->_make_exporter($exports, $is_reexport);
# spent 13.5ms making 7 calls to Moose::Exporter::_make_exporter, avg 1.93ms/call
54
55 my %methods;
567293µs $methods{import} = $class->_make_import_sub(
# spent 293µs making 7 calls to Moose::Exporter::_make_import_sub, avg 42µs/call
57 $exporting_package,
58 $exporter,
59 \@exports_from,
60 $is_reexport
61 );
62
637202µs $methods{unimport} = $class->_make_unimport_sub(
# spent 202µs making 7 calls to Moose::Exporter::_make_unimport_sub, avg 29µs/call
64 $exporting_package,
65 $exports,
66 $export_recorder,
67 $is_reexport
68 );
69
707693µs $methods{init_meta} = $class->_make_init_meta(
# spent 693µs making 7 calls to Moose::Exporter::_make_init_meta, avg 99µs/call
71 $exporting_package,
72 \%args
73 );
74
7571.12ms my $package = Class::MOP::Package->initialize($exporting_package);
# spent 1.12ms making 7 calls to Class::MOP::Package::initialize, avg 160µs/call
76 for my $to_install ( @{ $args{install} || [] } ) {
7758563µs my $symbol = '&' . $to_install;
78 next
79162.43ms unless $methods{$to_install}
# spent 2.43ms making 16 calls to Class::MOP::Package::has_package_symbol, avg 152µs/call
80 && !$package->has_package_symbol($symbol);
81163.41ms $package->add_package_symbol( $symbol, $methods{$to_install} );
# spent 3.41ms making 16 calls to Class::MOP::Package::add_package_symbol, avg 213µs/call
82 }
83
84 return ( $methods{import}, $methods{unimport}, $methods{init_meta} );
85}
86
87
# spent 13.5ms (378µs+13.2) within Moose::Exporter::_make_exporter which was called 7 times, avg 1.93ms/call: # 7 times (378µs+13.2ms) by Moose::Exporter::build_import_methods at line 53, avg 1.93ms/call
sub _make_exporter {
8814378µs my ($class, $exports, $is_reexport) = @_;
89
90 return Sub::Exporter::build_exporter(
91 {
92 exports => $exports,
93 groups => { default => [':all'] },
94
# spent 725ms (81.5+644) within Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:125] which was called 180 times, avg 4.03ms/call: # 180 times (81.5ms+644ms) by Sub::Exporter::_do_import at line 799 of Sub/Exporter.pm, avg 4.03ms/call
installer => sub {
95157822.0ms my ($arg, $to_export) = @_;
961806.60ms my $meta = Class::MOP::class_of($arg->{into});
# spent 6.60ms making 180 calls to Class::MOP::class_of, avg 37µs/call
97
98723.7ms goto &Sub::Exporter::default_installer unless $meta;
# spent 23.7ms making 7 calls to Sub::Exporter::default_installer, avg 3.38ms/call
99
100 # don't overwrite existing symbols with our magically flagged
101 # version of it if we would install the same sub that's already
102 # in the importer
103
104 my @filtered_to_export;
105 my %installed;
106703047.8ms for (my $i = 0; $i < @{ $to_export }; $i += 2) {
107 my ($as, $cv) = @{ $to_export }[$i, $i + 1];
108
1091762207ms next if !ref($as)
# spent 206ms making 1759 calls to Class::MOP::Package::has_package_symbol, avg 117µs/call # spent 368µs making 3 calls to Class::MOP::Package::get_package_symbol, avg 123µs/call
110 && $meta->has_package_symbol('&' . $as)
111 && $meta->get_package_symbol('&' . $as) == $cv;
112
113 push @filtered_to_export, $as, $cv;
114 $installed{$as} = 1 unless ref $as;
115 }
116
117173429ms Sub::Exporter::default_installer($arg, \@filtered_to_export);
# spent 429ms making 173 calls to Sub::Exporter::default_installer, avg 2.48ms/call
118
119 for my $name ( keys %{$is_reexport} ) {
1203254µs2202µs
# spent 124µs (47+78) within Moose::Exporter::BEGIN@120 which was called: # once (47µs+78µs) by Moose::BEGIN@15 at line 120
no strict 'refs';
# spent 124µs making 1 call to Moose::Exporter::BEGIN@120 # spent 78µs making 1 call to strict::unimport
12137.83ms2183µs
# spent 114µs (45+69) within Moose::Exporter::BEGIN@121 which was called: # once (45µs+69µs) by Moose::BEGIN@15 at line 121
no warnings 'once';
# spent 114µs making 1 call to Moose::Exporter::BEGIN@121 # spent 69µs making 1 call to warnings::unimport
1225018.76ms next unless exists $installed{$name};
1232491.74ms _flag_as_reexport( \*{ join q{::}, $arg->{into}, $name } );
# spent 1.74ms making 249 calls to Moose::Exporter::_flag_as_reexport, avg 7µs/call
124 }
125 },
126 }
127713.2ms );
# spent 13.2ms making 7 calls to Sub::Exporter::build_exporter, avg 1.88ms/call
128}
129
130{
131212µs my $seen = {};
132
133
# spent 633µs (397+236) within Moose::Exporter::_follow_also which was called 7 times, avg 90µs/call: # 7 times (397µs+236µs) by Moose::Exporter::build_import_methods at line 42, avg 90µs/call
sub _follow_also {
13428426µs my $class = shift;
135 my $exporting_package = shift;
136
137 local %$seen = ( $exporting_package => 1 );
138
13914236µs return uniq( _follow_also_real($exporting_package) );
# spent 148µs making 7 calls to Moose::Exporter::_follow_also_real, avg 21µs/call # spent 88µs making 7 calls to List::MoreUtils::uniq, avg 13µs/call
140 }
141
142
# spent 148µs within Moose::Exporter::_follow_also_real which was called 7 times, avg 21µs/call: # 7 times (148µs+0s) by Moose::Exporter::_follow_also at line 139, avg 21µs/call
sub _follow_also_real {
14328227µs my $exporting_package = shift;
144
145 if ( !exists $EXPORT_SPEC{$exporting_package} ) {
146 my $loaded = Class::MOP::is_class_loaded($exporting_package);
147
148 die "Package in also ($exporting_package) does not seem to "
149 . "use Moose::Exporter"
150 . ( $loaded ? "" : " (is it loaded?)" );
151 }
152
153 my $also = $EXPORT_SPEC{$exporting_package}{also};
154
155 return unless defined $also;
156
157 my @also = ref $also ? @{$also} : $also;
158
159 for my $package (@also) {
160 die
161 "Circular reference in 'also' parameter to Moose::Exporter between $exporting_package and $package"
162 if $seen->{$package};
163
164 $seen->{$package} = 1;
165 }
166
167 return @also, map { _follow_also_real($_) } @also;
168 }
169}
170
171
# spent 187µs within Moose::Exporter::_parse_trait_aliases which was called 7 times, avg 27µs/call: # 7 times (187µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 233, avg 27µs/call
sub _parse_trait_aliases {
17235222µs my $class = shift;
173 my ($package, $aliases) = @_;
174
175 my @ret;
176 for my $alias (@$aliases) {
177 my $name;
178 if (ref($alias)) {
179 reftype($alias) eq 'ARRAY'
180 or Moose->throw_error(reftype($alias) . " references are not "
181 . "valid arguments to the 'trait_aliases' "
182 . "option");
183
184 ($alias, $name) = @$alias;
185 }
186 else {
187 ($name = $alias) =~ s/.*:://;
188 }
189 push @ret, subname "${package}::${name}" => sub () { $alias };
190 }
191
192 return @ret;
193}
194
195
# spent 6.54ms (3.41+3.13) within Moose::Exporter::_make_sub_exporter_params which was called 7 times, avg 934µs/call: # 7 times (3.41ms+3.13ms) by Moose::Exporter::build_import_methods at line 47, avg 934µs/call
sub _make_sub_exporter_params {
19649220µs my $class = shift;
197 my $packages = shift;
198 my $export_recorder = shift;
199 my $is_reexport = shift;
200
201 my %exports;
202
203 for my $package ( @{$packages} ) {
20435346µs my $args = $EXPORT_SPEC{$package}
205 or die "The $package package does not use Moose::Exporter\n";
206
207 for my $name ( @{ $args->{with_meta} } ) {
20848486µs16424µs my $sub = $class->_sub_from_package( $package, $name )
# spent 424µs making 16 calls to Moose::Exporter::_sub_from_package, avg 27µs/call
209 or next;
210
211 my $fq_name = $package . '::' . $name;
212
21316396µs $exports{$name} = $class->_make_wrapped_sub_with_meta(
# spent 396µs making 16 calls to Moose::Exporter::_make_wrapped_sub_with_meta, avg 25µs/call
214 $fq_name,
215 $sub,
216 $export_recorder,
217 );
218 }
219
220 for my $name ( @{ $args->{with_caller} } ) {
22175774µs25688µs my $sub = $class->_sub_from_package( $package, $name )
# spent 688µs making 25 calls to Moose::Exporter::_sub_from_package, avg 28µs/call
222 or next;
223
224 my $fq_name = $package . '::' . $name;
225
22625720µs $exports{$name} = $class->_make_wrapped_sub(
# spent 720µs making 25 calls to Moose::Exporter::_make_wrapped_sub, avg 29µs/call
227 $fq_name,
228 $sub,
229 $export_recorder,
230 );
231 }
232
2337187µs my @extra_exports = $class->_parse_trait_aliases(
# spent 187µs making 7 calls to Moose::Exporter::_parse_trait_aliases, avg 27µs/call
234 $package, $args->{trait_aliases},
235 );
236 for my $name ( @{ $args->{as_is} }, @extra_exports ) {
237116661µs my ( $sub, $coderef_name );
238
23966489µs if ( ref $name ) {
240 $sub = $name;
241
242 my $coderef_pkg;
243435µs ( $coderef_pkg, $coderef_name )
# spent 35µs making 4 calls to Class::MOP::get_code_info, avg 9µs/call
244 = Class::MOP::get_code_info($name);
245
246 if ( $coderef_pkg ne $package ) {
247 $is_reexport->{$coderef_name} = 1;
248 }
249 }
250 else {
25125681µs $sub = $class->_sub_from_package( $package, $name )
# spent 681µs making 25 calls to Moose::Exporter::_sub_from_package, avg 27µs/call
252 or next;
253
254 $coderef_name = $name;
255 }
256
257 $export_recorder->{$sub} = 1;
258
2597929.46ms
# spent 7.09ms within Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:259] which was called 792 times, avg 9µs/call: # 792 times (7.09ms+0s) by Sub::Exporter::default_generator at line 856 of Sub/Exporter.pm, avg 9µs/call
$exports{$coderef_name} = sub {$sub};
260 }
261 }
262
263 return \%exports;
264}
265
266
# spent 1.79ms within Moose::Exporter::_sub_from_package which was called 66 times, avg 27µs/call: # 25 times (688µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 221, avg 28µs/call # 25 times (681µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 251, avg 27µs/call # 16 times (424µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 208, avg 27µs/call
sub _sub_from_package {
2673301.56ms my $sclass = shift;
268 my $package = shift;
269 my $name = shift;
270
27166486µs my $sub = do {
27236.93ms2246µs
# spent 153µs (60+93) within Moose::Exporter::BEGIN@272 which was called: # once (60µs+93µs) by Moose::BEGIN@15 at line 272
no strict 'refs';
# spent 153µs making 1 call to Moose::Exporter::BEGIN@272 # spent 93µs making 1 call to strict::unimport
273 \&{ $package . '::' . $name };
274 };
275
276 return $sub if defined &$sub;
277
278 Carp::cluck "Trying to export undefined sub ${package}::${name}";
279
280 return;
281}
282
28312µsour $CALLER;
284
285
# spent 720µs within Moose::Exporter::_make_wrapped_sub which was called 25 times, avg 29µs/call: # 25 times (720µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 226, avg 29µs/call
sub _make_wrapped_sub {
286125810µs my $self = shift;
287 my $fq_name = shift;
288 my $sub = shift;
289 my $export_recorder = shift;
290
291 # We need to set the package at import time, so that when
292 # package Foo imports has(), we capture "Foo" as the
293 # package. This lets other packages call Foo::has() and get
294 # the right package. This is done for backwards compatibility
295 # with existing production code, not because this is a good
296 # idea ;)
297
# spent 4.79ms (2.34+2.46) within Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:307] which was called 50 times, avg 96µs/call: # 50 times (2.34ms+2.46ms) by Sub::Exporter::default_generator at line 856 of Sub/Exporter.pm, avg 96µs/call
return sub {
2982502.93ms my $caller = $CALLER;
299
300501.73ms my $wrapper = $self->_curry_wrapper( $sub, $fq_name, $caller );
# spent 1.73ms making 50 calls to Moose::Exporter::_curry_wrapper, avg 35µs/call
301
30250725µs my $sub = subname( $fq_name => $wrapper );
# spent 725µs making 50 calls to Sub::Name::subname, avg 15µs/call
303
304 $export_recorder->{$sub} = 1;
305
306 return $sub;
307 };
308}
309
310
# spent 396µs within Moose::Exporter::_make_wrapped_sub_with_meta which was called 16 times, avg 25µs/call: # 16 times (396µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 213, avg 25µs/call
sub _make_wrapped_sub_with_meta {
31180518µs my $self = shift;
312 my $fq_name = shift;
313 my $sub = shift;
314 my $export_recorder = shift;
315
316
# spent 110ms (56.3+53.3) within Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:329] which was called 1008 times, avg 109µs/call: # 1008 times (56.3ms+53.3ms) by Sub::Exporter::default_generator at line 856 of Sub/Exporter.pm, avg 109µs/call
return sub {
317504068.0ms my $caller = $CALLER;
318
319 my $wrapper = $self->_late_curry_wrapper(
320 $sub, $fq_name,
3212174.84ms122546.9ms
# spent 13.0ms (4.97+8.05) within Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:321] which was called 217 times, avg 60µs/call: # 217 times (4.97ms+8.05ms) by Moose::Role::after or Moose::Role::around or Moose::Role::before or Moose::Role::has or Moose::Role::override or Moose::Role::requires or Moose::Role::with or Moose::around or Moose::extends or Moose::has or Moose::with at line 358, avg 60µs/call
sub { Class::MOP::class_of(shift) } => $caller
# spent 38.9ms making 1008 calls to Moose::Exporter::_late_curry_wrapper, avg 39µs/call # spent 8.05ms making 217 calls to Class::MOP::class_of, avg 37µs/call
322 );
323
324100814.4ms my $sub = subname( $fq_name => $wrapper );
# spent 14.4ms making 1008 calls to Sub::Name::subname, avg 14µs/call
325
326 $export_recorder->{$sub} = 1;
327
328 return $sub;
329 };
330}
331
332
# spent 1.73ms (1.70+32µs) within Moose::Exporter::_curry_wrapper which was called 50 times, avg 35µs/call: # 50 times (1.70ms+32µs) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:307] at line 300, avg 35µs/call
sub _curry_wrapper {
3333502.01ms my $class = shift;
334 my $sub = shift;
335 my $fq_name = shift;
336 my @extra = @_;
337
3382324.55ms232194ms my $wrapper = sub { $sub->( @extra, @_ ) };
# spent 167ms making 212 calls to MooseX::Role::Parameterized::method, avg 786µs/call # spent 26.3ms making 1 call to MooseX::Role::Parameterized::parameter # spent 501µs making 17 calls to MooseX::Types::CheckedUtilExports::__ANON__[MooseX/Types/CheckedUtilExports.pm:64], avg 29µs/call # spent 288µs making 2 calls to MooseX::Role::Parameterized::role, avg 144µs/call
339432µs if ( my $proto = prototype $sub ) {
# spent 32µs making 4 calls to Scalar::Util::set_prototype, avg 8µs/call
340
341 # XXX - Perl's prototype sucks. Use & to make set_prototype
342 # ignore the fact that we're passing "private variables"
343 &Scalar::Util::set_prototype( $wrapper, $proto );
344 }
345 return $wrapper;
346}
347
348
# spent 38.9ms within Moose::Exporter::_late_curry_wrapper which was called 1008 times, avg 39µs/call: # 1008 times (38.9ms+0s) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:329] at line 321, avg 39µs/call
sub _late_curry_wrapper {
349806444.2ms my $class = shift;
350 my $sub = shift;
351 my $fq_name = shift;
352 my $extra = shift;
353 my @ex_args = @_;
354
355 my $wrapper = sub {
356
357 # resolve curried arguments at runtime via this closure
3584349.25ms21713.0ms my @curry = ( $extra->(@ex_args) );
# spent 13.0ms making 217 calls to Moose::Exporter::__ANON__[Moose/Exporter.pm:321], avg 60µs/call
35921710.3s return $sub->( @curry, @_ );
# spent 5.10s making 50 calls to Moose::has, avg 102ms/call # spent 2.73s making 53 calls to Moose::with, avg 51.4ms/call, recursion: max depth 1, sum of overlapping time 91.9ms # spent 3.41s making 69 calls to Moose::Role::with, avg 49.4ms/call, recursion: max depth 3, sum of overlapping time 895ms # spent 18.3ms making 3 calls to Moose::extends, avg 6.10ms/call # spent 5.75ms making 9 calls to Moose::Role::has, avg 639µs/call # spent 2.97ms making 14 calls to Moose::Role::around, avg 212µs/call # spent 2.64ms making 9 calls to Moose::Role::requires, avg 294µs/call # spent 1.99ms making 1 call to Moose::around # spent 1.52ms making 4 calls to Moose::Role::override, avg 381µs/call # spent 711µs making 3 calls to Moose::Role::before, avg 237µs/call # spent 456µs making 2 calls to Moose::Role::after, avg 228µs/call
360 };
361
362 if ( my $proto = prototype $sub ) {
363
364 # XXX - Perl's prototype sucks. Use & to make set_prototype
365 # ignore the fact that we're passing "private variables"
366 &Scalar::Util::set_prototype( $wrapper, $proto );
367 }
368 return $wrapper;
369}
370
371
# spent 293µs within Moose::Exporter::_make_import_sub which was called 7 times, avg 42µs/call: # 7 times (293µs+0s) by Moose::Exporter::build_import_methods at line 56, avg 42µs/call
sub _make_import_sub {
37242314µs shift;
373 my $exporting_package = shift;
374 my $exporter = shift;
375 my $exports_from = shift;
376 my $is_reexport = shift;
377
378
# spent 3.65s (43.2ms+3.60) within Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:456] which was called 180 times, avg 20.3ms/call: # 2 times (407µs+16.0ms) by MooseX::Types::import at line 362 of MooseX/Types.pm, avg 8.21ms/call # 2 times (408µs+14.7ms) by MooseX::Types::import at line 365 of MooseX/Types.pm, avg 7.58ms/call # once (250µs+63.3ms) by Markdent::Event::StartDocument::BEGIN@11 at line 11 of Markdent/Event/StartDocument.pm # once (229µs+48.7ms) by Markdent::Event::EndLink::BEGIN@10 at line 10 of Markdent/Event/EndLink.pm # once (285µs+47.7ms) by Markdent::Handler::HTMLStream::Document::BEGIN@13 at line 13 of Markdent/Handler/HTMLStream/Document.pm # once (264µs+47.2ms) by Markdent::Event::StartEmphasis::BEGIN@13 at line 13 of Markdent/Event/StartEmphasis.pm # once (231µs+45.9ms) by Markdent::Event::HTMLComment::BEGIN@12 at line 12 of Markdent/Event/HTMLComment.pm # once (268µs+35.5ms) by MooseX::Role::Parameterized::Meta::Role::Parameterized::BEGIN@2 at line 2 of MooseX/Role/Parameterized/Meta/Role/Parameterized.pm # once (202µs+31.7ms) by MooseX::Types::BEGIN@10 at line 10 of MooseX/Types.pm # once (226µs+29.9ms) by Markdent::Event::EndOrderedList::BEGIN@11 at line 11 of Markdent/Event/EndOrderedList.pm # once (247µs+28.8ms) by Markdent::Event::HTMLTag::BEGIN@12 at line 12 of Markdent/Event/HTMLTag.pm # once (299µs+28.4ms) by Markdent::Event::HTMLBlock::BEGIN@13 at line 13 of Markdent/Event/HTMLBlock.pm # once (240µs+27.8ms) by Markdent::Parser::BEGIN@19 at line 19 of Markdent/Parser.pm # once (234µs+27.7ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@34 at line 34 of Markdent/Dialect/Standard/BlockParser.pm # once (251µs+27.6ms) by Markdent::Event::EndHTMLTag::BEGIN@13 at line 13 of Markdent/Event/EndHTMLTag.pm # once (264µs+27.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@32 at line 32 of Markdent/Dialect/Standard/SpanParser.pm # once (249µs+27.4ms) by Markdent::Event::StartHeader::BEGIN@12 at line 12 of Markdent/Event/StartHeader.pm # once (236µs+27.4ms) by Markdent::Event::HTMLBlock::BEGIN@12 at line 12 of Markdent/Event/HTMLBlock.pm # once (258µs+26.9ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@34 at line 34 of Markdent/Dialect/Standard/SpanParser.pm # once (292µs+26.6ms) by Markdent::Event::HTMLEntity::BEGIN@12 at line 12 of Markdent/Event/HTMLEntity.pm # once (228µs+26.7ms) by Markdent::Event::StartParagraph::BEGIN@11 at line 11 of Markdent/Event/StartParagraph.pm # once (240µs+26.5ms) by Markdent::Event::EndListItem::BEGIN@11 at line 11 of Markdent/Event/EndListItem.pm # once (227µs+26.4ms) by Markdent::Event::HTMLEntity::BEGIN@13 at line 13 of Markdent/Event/HTMLEntity.pm # once (242µs+26.1ms) by Markdent::Event::StartHeader::BEGIN@13 at line 13 of Markdent/Event/StartHeader.pm # once (230µs+25.8ms) by Markdent::Event::StartHTMLTag::BEGIN@13 at line 13 of Markdent/Event/StartHTMLTag.pm # once (258µs+25.6ms) by Markdent::Event::AutoLink::BEGIN@13 at line 13 of Markdent/Event/AutoLink.pm # once (278µs+25.1ms) by MooseX::Types::BEGIN@2 at line 2 of MooseX/Types.pm # once (256µs+25.0ms) by MooseX::Role::Parameterized::Parameters::BEGIN@2 at line 2 of MooseX/Role/Parameterized/Parameters.pm # once (228µs+25.0ms) by Markdent::Event::Image::BEGIN@13 at line 13 of Markdent/Event/Image.pm # once (231µs+25.0ms) by Markdent::Event::HTMLTag::BEGIN@13 at line 13 of Markdent/Event/HTMLTag.pm # once (232µs+24.9ms) by Markdent::Simple::Document::BEGIN@16 at line 16 of Markdent/Simple/Document.pm # once (299µs+24.7ms) by Markdent::Event::HTMLCommentBlock::BEGIN@13 at line 13 of Markdent/Event/HTMLCommentBlock.pm # once (230µs+24.8ms) by Markdent::Event::StartLink::BEGIN@13 at line 13 of Markdent/Event/StartLink.pm # once (229µs+24.8ms) by Markdent::Event::HTMLComment::BEGIN@13 at line 13 of Markdent/Event/HTMLComment.pm # once (238µs+24.7ms) by Markdent::Event::EndUnorderedList::BEGIN@11 at line 11 of Markdent/Event/EndUnorderedList.pm # once (229µs+24.7ms) by Markdent::Event::Text::BEGIN@13 at line 13 of Markdent/Event/Text.pm # once (230µs+24.6ms) by Markdent::Event::StartStrong::BEGIN@13 at line 13 of Markdent/Event/StartStrong.pm # once (229µs+24.6ms) by Markdent::Event::StartCode::BEGIN@13 at line 13 of Markdent/Event/StartCode.pm # once (228µs+24.5ms) by Markdent::Event::EndCode::BEGIN@13 at line 13 of Markdent/Event/EndCode.pm # once (231µs+24.5ms) by Markdent::Event::Preformatted::BEGIN@13 at line 13 of Markdent/Event/Preformatted.pm # once (227µs+24.3ms) by Markdent::Event::EndEmphasis::BEGIN@13 at line 13 of Markdent/Event/EndEmphasis.pm # once (227µs+24.1ms) by Markdent::Event::EndStrong::BEGIN@13 at line 13 of Markdent/Event/EndStrong.pm # once (241µs+23.9ms) by Markdent::Event::EndHeader::BEGIN@13 at line 13 of Markdent/Event/EndHeader.pm # once (229µs+23.7ms) by Markdent::Event::EndBlockquote::BEGIN@11 at line 11 of Markdent/Event/EndBlockquote.pm # once (227µs+23.7ms) by Markdent::Event::StartBlockquote::BEGIN@11 at line 11 of Markdent/Event/StartBlockquote.pm # once (227µs+23.7ms) by Markdent::Event::StartListItem::BEGIN@11 at line 11 of Markdent/Event/StartListItem.pm # once (228µs+23.6ms) by Markdent::Event::EndDocument::BEGIN@11 at line 11 of Markdent/Event/EndDocument.pm # once (272µs+23.6ms) by Markdent::Role::Event::BEGIN@10 at line 10 of Markdent/Role/Event.pm # once (230µs+23.6ms) by Markdent::Event::EndLink::BEGIN@11 at line 11 of Markdent/Event/EndLink.pm # once (248µs+23.5ms) by Markdent::Event::EndParagraph::BEGIN@11 at line 11 of Markdent/Event/EndParagraph.pm # once (235µs+23.5ms) by Markdent::Event::StartOrderedList::BEGIN@11 at line 11 of Markdent/Event/StartOrderedList.pm # once (226µs+23.4ms) by Markdent::Event::StartUnorderedList::BEGIN@11 at line 11 of Markdent/Event/StartUnorderedList.pm # once (229µs+23.4ms) by Markdent::Parser::BEGIN@18 at line 18 of Markdent/Parser.pm # once (229µs+23.4ms) by Markdent::Event::HorizontalRule::BEGIN@11 at line 11 of Markdent/Event/HorizontalRule.pm # once (328µs+23.3ms) by Markdent::Event::StartCode::BEGIN@12 at line 12 of Markdent/Event/StartCode.pm # once (230µs+23.3ms) by Markdent::Handler::HTMLStream::Document::BEGIN@12 at line 12 of Markdent/Handler/HTMLStream/Document.pm # once (229µs+23.1ms) by MooseX::Types::Base::BEGIN@3 at line 3 of MooseX/Types/Base.pm # once (231µs+23.0ms) by Markdent::Event::Preformatted::BEGIN@12 at line 12 of Markdent/Event/Preformatted.pm # once (230µs+23.0ms) by Markdent::Simple::Document::BEGIN@15 at line 15 of Markdent/Simple/Document.pm # once (233µs+22.9ms) by Markdent::Event::StartStrong::BEGIN@12 at line 12 of Markdent/Event/StartStrong.pm # once (228µs+22.9ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@33 at line 33 of Markdent/Dialect/Standard/BlockParser.pm # once (227µs+22.9ms) by Markdent::Event::StartListItem::BEGIN@10 at line 10 of Markdent/Event/StartListItem.pm # once (229µs+22.8ms) by Markdent::Event::EndHTMLTag::BEGIN@12 at line 12 of Markdent/Event/EndHTMLTag.pm # once (230µs+22.7ms) by Markdent::Event::StartOrderedList::BEGIN@10 at line 10 of Markdent/Event/StartOrderedList.pm # once (250µs+22.7ms) by Markdent::Parser::BEGIN@17 at line 17 of Markdent/Parser.pm # once (238µs+22.7ms) by Markdent::Event::StartParagraph::BEGIN@10 at line 10 of Markdent/Event/StartParagraph.pm # once (244µs+22.7ms) by Markdent::Event::EndUnorderedList::BEGIN@10 at line 10 of Markdent/Event/EndUnorderedList.pm # once (254µs+22.7ms) by Markdent::Event::HorizontalRule::BEGIN@10 at line 10 of Markdent/Event/HorizontalRule.pm # once (238µs+22.7ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@32 at line 32 of Markdent/Dialect/Standard/BlockParser.pm # once (234µs+22.6ms) by Markdent::Event::HTMLCommentBlock::BEGIN@12 at line 12 of Markdent/Event/HTMLCommentBlock.pm # once (232µs+22.6ms) by Markdent::Event::AutoLink::BEGIN@12 at line 12 of Markdent/Event/AutoLink.pm # once (232µs+22.6ms) by Markdent::Event::EndHeader::BEGIN@12 at line 12 of Markdent/Event/EndHeader.pm # once (229µs+22.6ms) by Markdent::Event::StartBlockquote::BEGIN@10 at line 10 of Markdent/Event/StartBlockquote.pm # once (230µs+22.6ms) by Markdent::Event::EndStrong::BEGIN@12 at line 12 of Markdent/Event/EndStrong.pm # once (229µs+22.6ms) by Markdent::Event::EndOrderedList::BEGIN@10 at line 10 of Markdent/Event/EndOrderedList.pm # once (231µs+22.6ms) by Markdent::Event::StartHTMLTag::BEGIN@12 at line 12 of Markdent/Event/StartHTMLTag.pm # once (230µs+22.6ms) by Markdent::Event::EndDocument::BEGIN@10 at line 10 of Markdent/Event/EndDocument.pm # once (228µs+22.5ms) by Markdent::Event::EndListItem::BEGIN@10 at line 10 of Markdent/Event/EndListItem.pm # once (259µs+22.5ms) by MooseX::Role::Parameterized::Meta::Parameter::BEGIN@2 at line 2 of MooseX/Role/Parameterized/Meta/Parameter.pm # once (229µs+22.5ms) by Markdent::Event::StartUnorderedList::BEGIN@10 at line 10 of Markdent/Event/StartUnorderedList.pm # once (231µs+22.5ms) by Markdent::Event::Image::BEGIN@12 at line 12 of Markdent/Event/Image.pm # once (246µs+22.4ms) by Markdent::Event::Text::BEGIN@12 at line 12 of Markdent/Event/Text.pm # once (229µs+22.4ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@2 at line 2 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm # once (230µs+22.4ms) by Markdent::Event::StartLink::BEGIN@12 at line 12 of Markdent/Event/StartLink.pm # once (230µs+22.4ms) by Markdent::Event::StartDocument::BEGIN@10 at line 10 of Markdent/Event/StartDocument.pm # once (230µs+22.4ms) by Markdent::Event::StartEmphasis::BEGIN@12 at line 12 of Markdent/Event/StartEmphasis.pm # once (231µs+22.4ms) by Markdent::Event::EndParagraph::BEGIN@10 at line 10 of Markdent/Event/EndParagraph.pm # once (236µs+22.4ms) by Markdent::Event::EndBlockquote::BEGIN@10 at line 10 of Markdent/Event/EndBlockquote.pm # once (235µs+22.3ms) by Markdent::Event::EndEmphasis::BEGIN@12 at line 12 of Markdent/Event/EndEmphasis.pm # once (229µs+22.3ms) by Markdent::Event::EndCode::BEGIN@12 at line 12 of Markdent/Event/EndCode.pm # once (308µs+21.9ms) by Markdent::Role::BalancedEvent::BEGIN@14 at line 14 of Markdent/Role/BalancedEvent.pm # once (298µs+21.5ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@33 at line 33 of Markdent/Dialect/Standard/SpanParser.pm # once (256µs+20.1ms) by Moose::Meta::Method::Accessor::Native::Array::sort_in_place::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/sort_in_place.pm # once (236µs+18.2ms) by Moose::Meta::Method::Accessor::Native::Hash::elements::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/elements.pm # once (228µs+17.7ms) by Moose::Meta::Method::Accessor::Native::Counter::reset::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Counter/reset.pm # once (230µs+17.6ms) by Moose::Meta::Method::Accessor::Native::Hash::accessor::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Hash/accessor.pm # once (279µs+17.5ms) by MooseX::Role::Parameterized::Meta::Trait::Parameterized::BEGIN@2 at line 2 of MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm # once (241µs+17.6ms) by Moose::Meta::Method::Accessor::Native::Array::uniq::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/uniq.pm # once (255µs+17.2ms) by Moose::Meta::Method::Accessor::Native::String::length::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/String/length.pm # once (228µs+17.2ms) by Moose::Meta::Method::Accessor::Native::Array::sort::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/sort.pm # once (305µs+16.6ms) by Moose::Meta::Method::Accessor::Native::String::inc::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/String/inc.pm # once (350µs+16.3ms) by Moose::Meta::Method::Accessor::Native::Hash::keys::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/keys.pm # once (253µs+16.3ms) by Moose::Meta::Method::Accessor::Native::Array::grep::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/grep.pm # once (299µs+16.1ms) by Moose::Meta::Method::Accessor::Native::Writer::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Writer.pm # once (231µs+15.4ms) by Moose::Meta::Method::Accessor::Native::Hash::is_empty::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm # once (243µs+15.4ms) by Moose::Meta::Method::Accessor::Native::Array::natatime::BEGIN@13 at line 13 of Moose/Meta/Method/Accessor/Native/Array/natatime.pm # once (252µs+15.2ms) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 9 of MooseX/SemiAffordanceAccessor/Role/Attribute.pm # once (230µs+15.2ms) by Markdent::Role::EventAsText::BEGIN@10 at line 10 of Markdent/Role/EventAsText.pm # once (237µs+15.1ms) by Moose::Meta::Method::Accessor::Native::Array::delete::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/delete.pm # once (233µs+15.0ms) by Moose::Meta::Method::Accessor::Native::Hash::values::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/values.pm # once (273µs+15.0ms) by Moose::Meta::Method::Accessor::Native::Hash::set::BEGIN@13 at line 13 of Moose/Meta/Method/Accessor/Native/Hash/set.pm # once (229µs+14.9ms) by Moose::Meta::Method::Accessor::Native::Counter::set::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Counter/set.pm # once (231µs+14.7ms) by Moose::Meta::Method::Accessor::Native::Array::shift::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/shift.pm # once (228µs+14.7ms) by Moose::Meta::Method::Accessor::Native::Reader::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Reader.pm # once (304µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/set.pm # once (232µs+14.7ms) by Moose::Meta::Attribute::Native::Trait::Counter::BEGIN@3 at line 3 of Moose/Meta/Attribute/Native/Trait/Counter.pm # once (228µs+14.7ms) by Moose::Meta::Method::Accessor::Native::Bool::toggle::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Bool/toggle.pm # once (261µs+14.6ms) by Moose::Meta::Method::Accessor::Native::String::prepend::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/String/prepend.pm # once (227µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Bool::set::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Bool/set.pm # once (228µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Hash::get::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/get.pm # once (231µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Hash::count::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/count.pm # once (231µs+14.6ms) by Markdent::Role::DebugPrinter::BEGIN@12 at line 12 of Markdent/Role/DebugPrinter.pm # once (230µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Collection::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Collection.pm # once (231µs+14.6ms) by Moose::Meta::Method::Accessor::Native::String::clear::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/String/clear.pm # once (240µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Array::Writer::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/Writer.pm # once (229µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Array::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Array.pm # once (232µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Counter::inc::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Counter/inc.pm # once (233µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Array::push::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/push.pm # once (232µs+14.6ms) by Markdent::Role::SpanParser::BEGIN@10 at line 10 of Markdent/Role/SpanParser.pm # once (231µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Array::get::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/get.pm # once (229µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Hash::exists::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/exists.pm # once (234µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Array::elements::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/elements.pm # once (229µs+14.6ms) by Moose::Meta::Method::Accessor::Native::Array::count::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/count.pm # once (244µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Array::pop::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/pop.pm # once (239µs+14.5ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@3 at line 3 of Moose/Meta/Attribute/Native/Trait/Hash.pm # once (266µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Bool::unset::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Bool/unset.pm # once (233µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Counter::dec::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Counter/dec.pm # once (230µs+14.5ms) by Markdent::Role::BlockParser::BEGIN@10 at line 10 of Markdent/Role/BlockParser.pm # once (227µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Bool::not::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Bool/not.pm # once (230µs+14.5ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@3 at line 3 of Moose/Meta/Attribute/Native/Trait/Array.pm # once (232µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Hash::clear::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Hash/clear.pm # once (236µs+14.5ms) by Moose::Meta::Method::Accessor::Native::String::chomp::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/String/chomp.pm # once (229µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Array::clear::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/clear.pm # once (309µs+14.4ms) by Moose::Meta::Attribute::Native::Trait::BEGIN@3 at line 3 of Moose/Meta/Attribute/Native/Trait.pm # once (231µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Hash::defined::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/defined.pm # once (232µs+14.5ms) by Moose::Meta::Method::Accessor::Native::String::match::BEGIN@13 at line 13 of Moose/Meta/Method/Accessor/Native/String/match.pm # once (229µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Hash::delete::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Hash/delete.pm # once (231µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/splice.pm # once (227µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Array::is_empty::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/is_empty.pm # once (232µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Array::reduce::BEGIN@13 at line 13 of Moose/Meta/Method/Accessor/Native/Array/reduce.pm # once (238µs+14.5ms) by Moose::Meta::Method::Accessor::Native::Array::map::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/map.pm # once (228µs+14.5ms) by Moose::Meta::Method::Accessor::Native::String::substr::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/String/substr.pm # once (239µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Hash::kv::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/kv.pm # once (305µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Hash::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Hash.pm # once (230µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Array::shuffle::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/shuffle.pm # once (228µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Array::first::BEGIN@13 at line 13 of Moose/Meta/Method/Accessor/Native/Array/first.pm # once (253µs+14.4ms) by Markdent::Role::AnyParser::BEGIN@10 at line 10 of Markdent/Role/AnyParser.pm # once (236µs+14.4ms) by Moose::Meta::Method::Accessor::Native::String::append::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/String/append.pm # once (232µs+14.4ms) by Moose::Meta::Method::Accessor::Native::String::chop::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/String/chop.pm # once (233µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Array::join::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/join.pm # once (230µs+14.4ms) by Moose::Meta::Method::Accessor::Native::String::replace::BEGIN@13 at line 13 of Moose/Meta/Method/Accessor/Native/String/replace.pm # once (231µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Array::insert::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/insert.pm # once (233µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Hash::Writer::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/Writer.pm # once (237µs+14.4ms) by Moose::Meta::Attribute::Native::Trait::Bool::BEGIN@2 at line 2 of Moose/Meta/Attribute/Native/Trait/Bool.pm # once (228µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Array::accessor::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/accessor.pm # once (231µs+14.4ms) by Moose::Meta::Method::Accessor::Native::Array::unshift::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor/Native/Array/unshift.pm # once (229µs+14.4ms) by Markdent::Role::HTMLStream::BEGIN@18 at line 18 of Markdent/Role/HTMLStream.pm # once (230µs+14.4ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@2 at line 2 of Moose/Meta/Attribute/Native/Trait/String.pm # once (233µs+14.3ms) by MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@12 at line 12 of MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm # once (231µs+14.3ms) by Moose::Meta::Method::Accessor::Native::BEGIN@13 at line 13 of Moose/Meta/Method/Accessor/Native.pm # once (226µs+14.3ms) by MooseX::StrictConstructor::Role::Object::BEGIN@9 at line 9 of MooseX/StrictConstructor/Role/Object.pm # once (226µs+14.2ms) by Markdent::Role::EventsAsMethods::BEGIN@12 at line 12 of Markdent/Role/EventsAsMethods.pm # once (225µs+14.2ms) by Markdent::Role::Handler::BEGIN@10 at line 10 of Markdent/Role/Handler.pm # once (205µs+10.7ms) by Moose::Meta::Attribute::Native::Trait::BEGIN@6 at line 6 of Moose/Meta/Attribute/Native/Trait.pm # once (202µs+10.4ms) by MooseX::Types::Base::BEGIN@14 at line 14 of MooseX/Types/Base.pm # once (255µs+8.40ms) by Moose::BEGIN@35 at line 35 of Moose.pm # once (211µs+7.93ms) by Moose::Role::BEGIN@19 at line 19 of Moose/Role.pm # once (329µs+2.33ms) by MooseX::Params::Validate::BEGIN@10 at line 10 of MooseX/Params/Validate.pm
return sub {
379
380 # I think we could use Sub::Exporter's collector feature
381 # to do this, but that would be rather gross, since that
382 # feature isn't really designed to return a value to the
383 # caller of the exporter sub.
384 #
385 # Also, this makes sure we preserve backwards compat for
386 # _get_caller, so it always sees the arguments in the
387 # expected order.
388342030.5ms my $traits;
38918010.8ms ( $traits, @_ ) = _strip_traits(@_);
# spent 10.8ms making 180 calls to Moose::Exporter::_strip_traits, avg 60µs/call
390
391 my $metaclass;
3921808.01ms ( $metaclass, @_ ) = _strip_metaclass(@_);
# spent 8.01ms making 180 calls to Moose::Exporter::_strip_metaclass, avg 45µs/call
393 $metaclass
394 = Moose::Util::resolve_metaclass_alias( 'Class' => $metaclass )
395 if defined $metaclass && length $metaclass;
396
397 my $meta_name;
3981807.55ms ( $meta_name, @_ ) = _strip_meta_name(@_);
# spent 7.55ms making 180 calls to Moose::Exporter::_strip_meta_name, avg 42µs/call
399
400 # Normally we could look at $_[0], but in some weird cases
401 # (involving goto &Moose::import), $_[0] ends as something
402 # else (like Squirrel).
403 my $class = $exporting_package;
404
4051802.95ms $CALLER = _get_caller(@_);
# spent 2.95ms making 180 calls to Moose::Exporter::_get_caller, avg 16µs/call
406
407 # this works because both pragmas set $^H (see perldoc
408 # perlvar) which affects the current compilation -
409 # i.e. the file who use'd us - which is why we don't need
410 # to do anything special to make it affect that file
411 # rather than this one (which is already compiled)
412
4131802.71ms strict->import;
# spent 2.71ms making 180 calls to strict::import, avg 15µs/call
41418012.7ms warnings->import;
# spent 12.7ms making 180 calls to warnings::import, avg 70µs/call
415
416 my $did_init_meta;
4171805.11ms1802.19ms for my $c ( grep { $_->can('init_meta') } $class, @{$exports_from} ) {
# spent 2.19ms making 180 calls to UNIVERSAL::can, avg 12µs/call
418
419 # init_meta can apply a role, which when loaded uses
420 # Moose::Exporter, which in turn sets $CALLER, so we need
421 # to protect against that.
4225104.38ms local $CALLER = $CALLER;
4231702.19s $c->init_meta(
# spent 1.08s making 42 calls to Moose::Exporter::__ANON__[Moose/Exporter.pm:643], avg 25.7ms/call # spent 697ms making 45 calls to Moose::init_meta, avg 15.5ms/call # spent 395ms making 81 calls to Moose::Role::init_meta, avg 4.87ms/call # spent 21.7ms making 2 calls to MooseX::Role::Parameterized::init_meta, avg 10.9ms/call
424 for_class => $CALLER,
425 metaclass => $metaclass,
426 meta_name => $meta_name,
427 );
428 $did_init_meta = 1;
429 }
430
431 if ( $did_init_meta && @{$traits} ) {
432
433 # The traits will use Moose::Role, which in turn uses
434 # Moose::Exporter, which in turn sets $CALLER, so we need
435 # to protect against that.
436 local $CALLER = $CALLER;
437 _apply_meta_traits( $CALLER, $traits );
438 }
439 elsif ( @{$traits} ) {
440 require Moose;
441 Moose->throw_error(
442 "Cannot provide traits when $class does not have an init_meta() method"
443 );
444 }
445
446 my ( undef, @args ) = @_;
447 my $extra = shift @args if ref $args[0] eq 'HASH';
448
449 $extra ||= {};
4503521.25ms if ( !$extra->{into} ) {
451 $extra->{into_level} ||= 0;
452 $extra->{into_level}++;
453 }
454
4551801.37s $class->$exporter( $extra, @args );
# spent 1.37s making 180 calls to Sub::Exporter::__ANON__[Sub/Exporter.pm:756], avg 7.59ms/call
456 };
457}
458
459
# spent 10.8ms (7.56+3.26) within Moose::Exporter::_strip_traits which was called 180 times, avg 60µs/call: # 180 times (7.56ms+3.26ms) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:456] at line 389, avg 60µs/call
sub _strip_traits {
46054711.5ms1803.26ms my $idx = first_index { ( $_ || '' ) eq '-traits' } @_;
# spent 3.26ms making 180 calls to List::MoreUtils::firstidx, avg 18µs/call
461
462 return ( [], @_ ) unless $idx >= 0 && $#_ >= $idx + 1;
463
464 my $traits = $_[ $idx + 1 ];
465
466 splice @_, $idx, 2;
467
468 $traits = [$traits] unless ref $traits;
469
470 return ( $traits, @_ );
471}
472
473
# spent 8.01ms (5.93+2.09) within Moose::Exporter::_strip_metaclass which was called 180 times, avg 45µs/call: # 180 times (5.93ms+2.09ms) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:456] at line 392, avg 45µs/call
sub _strip_metaclass {
4745478.59ms1802.09ms my $idx = first_index { ( $_ || '' ) eq '-metaclass' } @_;
# spent 2.09ms making 180 calls to List::MoreUtils::firstidx, avg 12µs/call
475
476 return ( undef, @_ ) unless $idx >= 0 && $#_ >= $idx + 1;
477
478 my $metaclass = $_[ $idx + 1 ];
479
480 splice @_, $idx, 2;
481
482 return ( $metaclass, @_ );
483}
484
485
# spent 7.55ms (5.57+1.98) within Moose::Exporter::_strip_meta_name which was called 180 times, avg 42µs/call: # 180 times (5.57ms+1.98ms) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:456] at line 398, avg 42µs/call
sub _strip_meta_name {
4865478.22ms1801.98ms my $idx = first_index { ( $_ || '' ) eq '-meta_name' } @_;
# spent 1.98ms making 180 calls to List::MoreUtils::firstidx, avg 11µs/call
487
488 return ( 'meta', @_ ) unless $idx >= 0 && $#_ >= $idx + 1;
489
490 my $meta_name = $_[ $idx + 1 ];
491
492 splice @_, $idx, 2;
493
494 return ( $meta_name, @_ );
495}
496
497sub _apply_meta_traits {
498 my ( $class, $traits ) = @_;
499
500 return unless @{$traits};
501
502 my $meta = Class::MOP::class_of($class);
503
504 my $type = ( split /::/, ref $meta )[-1]
505 or Moose->throw_error(
506 'Cannot determine metaclass type for trait application . Meta isa '
507 . ref $meta );
508
509 my @resolved_traits = map {
510 ref $_
511 ? $_
512 : Moose::Util::resolve_metatrait_alias( $type => $_ )
513 } @$traits;
514
515 return unless @resolved_traits;
516
517 my %args = ( for => $class );
518
519 if ( $meta->isa('Moose::Meta::Role') ) {
520 $args{role_metaroles} = { role => \@resolved_traits };
521 }
522 else {
523 $args{class_metaroles} = { class => \@resolved_traits };
524 }
525
526 Moose::Util::MetaRole::apply_metaroles(%args);
527}
528
529
# spent 2.95ms within Moose::Exporter::_get_caller which was called 180 times, avg 16µs/call: # 180 times (2.95ms+0s) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:456] at line 405, avg 16µs/call
sub _get_caller {
530
531 # 1 extra level because it's called by import so there's a layer
532 # of indirection
5333603.96ms my $offset = 1;
534
535 return
536 ( ref $_[1] && defined $_[1]->{into} ) ? $_[1]->{into}
537 : ( ref $_[1] && defined $_[1]->{into_level} )
538 ? caller( $offset + $_[1]->{into_level} )
539 : caller($offset);
540}
541
542
# spent 202µs within Moose::Exporter::_make_unimport_sub which was called 7 times, avg 29µs/call: # 7 times (202µs+0s) by Moose::Exporter::build_import_methods at line 63, avg 29µs/call
sub _make_unimport_sub {
54342223µs shift;
544 my $exporting_package = shift;
545 my $exports = shift;
546 my $export_recorder = shift;
547 my $is_reexport = shift;
548
549
# spent 55.9ms (3.55+52.4) within Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:557] which was called 75 times, avg 745µs/call: # once (59µs+921µs) by Moose::Meta::Method::Accessor::Native::Hash::elements::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Hash/elements.pm # once (61µs+797µs) by Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@60 at line 60 of Moose/Meta/Method/Accessor/Native/Array/splice.pm # once (46µs+794µs) by Moose::Meta::Method::Accessor::Native::Array::accessor::BEGIN@77 at line 77 of Moose/Meta/Method/Accessor/Native/Array/accessor.pm # once (60µs+776µs) by MooseX::Role::Parameterized::Meta::Role::Parameterized::BEGIN@9 at line 9 of MooseX/Role/Parameterized/Meta/Role/Parameterized.pm # once (46µs+777µs) by Moose::Meta::Method::Accessor::Native::Array::first::BEGIN@44 at line 44 of Moose/Meta/Method/Accessor/Native/Array/first.pm # once (46µs+777µs) by Moose::Meta::Method::Accessor::Native::Array::push::BEGIN@41 at line 41 of Moose/Meta/Method/Accessor/Native/Array/push.pm # once (45µs+774µs) by Moose::Meta::Method::Accessor::Native::Array::map::BEGIN@43 at line 43 of Moose/Meta/Method/Accessor/Native/Array/map.pm # once (58µs+745µs) by Moose::Meta::Method::Accessor::Native::Array::natatime::BEGIN@57 at line 57 of Moose/Meta/Method/Accessor/Native/Array/natatime.pm # once (63µs+737µs) by Moose::Meta::Method::Accessor::Native::String::inc::BEGIN@35 at line 35 of Moose/Meta/Method/Accessor/Native/String/inc.pm # once (47µs+753µs) by Moose::Meta::Method::Accessor::Native::Hash::values::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Hash/values.pm # once (48µs+747µs) by Moose::Meta::Method::Accessor::Native::String::prepend::BEGIN@38 at line 38 of Moose/Meta/Method/Accessor/Native/String/prepend.pm # once (48µs+739µs) by Moose::Meta::Method::Accessor::Native::Array::delete::BEGIN@55 at line 55 of Moose/Meta/Method/Accessor/Native/Array/delete.pm # once (44µs+737µs) by Moose::Meta::Method::Accessor::Native::String::match::BEGIN@43 at line 43 of Moose/Meta/Method/Accessor/Native/String/match.pm # once (47µs+734µs) by Moose::Meta::Method::Accessor::Native::Array::pop::BEGIN@49 at line 49 of Moose/Meta/Method/Accessor/Native/Array/pop.pm # once (45µs+734µs) by Moose::Meta::Method::Accessor::Native::Array::unshift::BEGIN@41 at line 41 of Moose/Meta/Method/Accessor/Native/Array/unshift.pm # once (44µs+734µs) by Moose::Meta::Method::Accessor::Native::Array::elements::BEGIN@24 at line 24 of Moose/Meta/Method/Accessor/Native/Array/elements.pm # once (54µs+723µs) by Moose::Meta::Method::Accessor::Native::Counter::reset::BEGIN@35 at line 35 of Moose/Meta/Method/Accessor/Native/Counter/reset.pm # once (45µs+728µs) by Moose::Meta::Method::Accessor::Native::Array::shuffle::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Array/shuffle.pm # once (47µs+726µs) by Moose::Meta::Method::Accessor::Native::Writer::BEGIN@187 at line 187 of Moose/Meta/Method/Accessor/Native/Writer.pm # once (65µs+706µs) by Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@71 at line 71 of Moose/Meta/Method/Accessor/Native/Array/set.pm # once (46µs+723µs) by Moose::Meta::Method::Accessor::Native::Array::uniq::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Array/uniq.pm # once (46µs+722µs) by Moose::Meta::Method::Accessor::Native::Array::count::BEGIN@23 at line 23 of Moose/Meta/Method/Accessor/Native/Array/count.pm # once (47µs+721µs) by Moose::Meta::Method::Accessor::Native::Bool::set::BEGIN@31 at line 31 of Moose/Meta/Method/Accessor/Native/Bool/set.pm # once (58µs+709µs) by Moose::Meta::Method::Accessor::Native::String::chomp::BEGIN@42 at line 42 of Moose/Meta/Method/Accessor/Native/String/chomp.pm # once (46µs+717µs) by Moose::Meta::Method::Accessor::Native::String::append::BEGIN@38 at line 38 of Moose/Meta/Method/Accessor/Native/String/append.pm # once (46µs+716µs) by Moose::Meta::Method::Accessor::Native::Array::is_empty::BEGIN@24 at line 24 of Moose/Meta/Method/Accessor/Native/Array/is_empty.pm # once (47µs+713µs) by Moose::Meta::Method::Accessor::Native::Hash::set::BEGIN@100 at line 100 of Moose/Meta/Method/Accessor/Native/Hash/set.pm # once (44µs+716µs) by Moose::Meta::Method::Accessor::Native::Hash::exists::BEGIN@42 at line 42 of Moose/Meta/Method/Accessor/Native/Hash/exists.pm # once (45µs+716µs) by Moose::Meta::Method::Accessor::Native::String::chop::BEGIN@42 at line 42 of Moose/Meta/Method/Accessor/Native/String/chop.pm # once (47µs+712µs) by Moose::Meta::Method::Accessor::Native::Hash::Writer::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Hash/Writer.pm # once (44µs+715µs) by Moose::Meta::Method::Accessor::Native::Array::sort_in_place::BEGIN@45 at line 45 of Moose/Meta/Method/Accessor/Native/Array/sort_in_place.pm # once (47µs+711µs) by Moose::Meta::Method::Accessor::Native::Hash::accessor::BEGIN@80 at line 80 of Moose/Meta/Method/Accessor/Native/Hash/accessor.pm # once (44µs+713µs) by Moose::Meta::Method::Accessor::Native::Array::clear::BEGIN@36 at line 36 of Moose/Meta/Method/Accessor/Native/Array/clear.pm # once (46µs+712µs) by Moose::Meta::Method::Accessor::Native::Bool::unset::BEGIN@31 at line 31 of Moose/Meta/Method/Accessor/Native/Bool/unset.pm # once (45µs+712µs) by Moose::Meta::Method::Accessor::Native::Array::BEGIN@23 at line 23 of Moose/Meta/Method/Accessor/Native/Array.pm # once (46µs+705µs) by Moose::Meta::Method::Accessor::Native::String::substr::BEGIN@128 at line 128 of Moose/Meta/Method/Accessor/Native/String/substr.pm # once (47µs+704µs) by Moose::Meta::Method::Accessor::Native::Counter::inc::BEGIN@37 at line 37 of Moose/Meta/Method/Accessor/Native/Counter/inc.pm # once (42µs+706µs) by Moose::Meta::Method::Accessor::Native::Hash::kv::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Hash/kv.pm # once (46µs+701µs) by Moose::Meta::Method::Accessor::Native::Array::join::BEGIN@43 at line 43 of Moose/Meta/Method/Accessor/Native/Array/join.pm # once (43µs+702µs) by Moose::Meta::Method::Accessor::Native::Array::sort::BEGIN@41 at line 41 of Moose/Meta/Method/Accessor/Native/Array/sort.pm # once (43µs+699µs) by Moose::Meta::Method::Accessor::Native::Hash::clear::BEGIN@36 at line 36 of Moose/Meta/Method/Accessor/Native/Hash/clear.pm # once (47µs+696µs) by Moose::Meta::Method::Accessor::Native::Counter::set::BEGIN@33 at line 33 of Moose/Meta/Method/Accessor/Native/Counter/set.pm # once (45µs+697µs) by Moose::Meta::Method::Accessor::Native::Array::reduce::BEGIN@44 at line 44 of Moose/Meta/Method/Accessor/Native/Array/reduce.pm # once (44µs+698µs) by Moose::Meta::Method::Accessor::Native::String::length::BEGIN@23 at line 23 of Moose/Meta/Method/Accessor/Native/String/length.pm # once (44µs+696µs) by Moose::Meta::Method::Accessor::Native::String::replace::BEGIN@54 at line 54 of Moose/Meta/Method/Accessor/Native/String/replace.pm # once (45µs+695µs) by Moose::Meta::Method::Accessor::Native::Array::shift::BEGIN@51 at line 51 of Moose/Meta/Method/Accessor/Native/Array/shift.pm # once (44µs+694µs) by Moose::Meta::Method::Accessor::Native::String::clear::BEGIN@35 at line 35 of Moose/Meta/Method/Accessor/Native/String/clear.pm # once (46µs+691µs) by Moose::Meta::Method::Accessor::Native::Array::insert::BEGIN@64 at line 64 of Moose/Meta/Method/Accessor/Native/Array/insert.pm # once (44µs+692µs) by Moose::Meta::Method::Accessor::Native::Array::grep::BEGIN@43 at line 43 of Moose/Meta/Method/Accessor/Native/Array/grep.pm # once (46µs+685µs) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@25 at line 25 of Moose/Meta/Attribute/Native/Trait/String.pm # once (46µs+684µs) by Moose::Meta::Method::Accessor::Native::Hash::BEGIN@21 at line 21 of Moose/Meta/Method/Accessor/Native/Hash.pm # once (45µs+684µs) by Moose::Meta::Method::Accessor::Native::Bool::toggle::BEGIN@35 at line 35 of Moose/Meta/Method/Accessor/Native/Bool/toggle.pm # once (44µs+684µs) by Moose::Meta::Method::Accessor::Native::Counter::dec::BEGIN@37 at line 37 of Moose/Meta/Method/Accessor/Native/Counter/dec.pm # once (45µs+682µs) by Moose::Meta::Method::Accessor::Native::Hash::get::BEGIN@41 at line 41 of Moose/Meta/Method/Accessor/Native/Hash/get.pm # once (44µs+679µs) by Moose::Meta::Method::Accessor::Native::Hash::delete::BEGIN@41 at line 41 of Moose/Meta/Method/Accessor/Native/Hash/delete.pm # once (44µs+680µs) by Moose::Meta::Method::Accessor::Native::Hash::count::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Hash/count.pm # once (43µs+680µs) by Moose::Meta::Method::Accessor::Native::Hash::defined::BEGIN@42 at line 42 of Moose/Meta/Method/Accessor/Native/Hash/defined.pm # once (43µs+675µs) by Moose::Meta::Method::Accessor::Native::Hash::keys::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Hash/keys.pm # once (44µs+675µs) by Moose::Meta::Method::Accessor::Native::Hash::is_empty::BEGIN@26 at line 26 of Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm # once (45µs+673µs) by Moose::Meta::Method::Accessor::Native::Reader::BEGIN@63 at line 63 of Moose/Meta/Method/Accessor/Native/Reader.pm # once (47µs+666µs) by Moose::Meta::Attribute::Native::Trait::Counter::BEGIN@22 at line 22 of Moose/Meta/Attribute/Native/Trait/Counter.pm # once (47µs+665µs) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@38 at line 38 of Moose/Meta/Attribute/Native/Trait/Array.pm # once (46µs+663µs) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@27 at line 27 of Moose/Meta/Attribute/Native/Trait/Hash.pm # once (45µs+664µs) by Moose::Meta::Method::Accessor::Native::Collection::BEGIN@147 at line 147 of Moose/Meta/Method/Accessor/Native/Collection.pm # once (47µs+661µs) by Moose::Meta::Attribute::Native::Trait::BEGIN@198 at line 198 of Moose/Meta/Attribute/Native/Trait.pm # once (46µs+652µs) by Moose::Meta::Attribute::Native::Trait::Bool::BEGIN@18 at line 18 of Moose/Meta/Attribute/Native/Trait/Bool.pm # once (46µs+634µs) by MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@41 at line 41 of MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm # once (45µs+615µs) by MooseX::Role::Parameterized::Meta::Trait::Parameterized::BEGIN@19 at line 19 of MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm # once (50µs+609µs) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@36 at line 36 of MooseX/SemiAffordanceAccessor/Role/Attribute.pm # once (47µs+607µs) by Moose::Meta::Attribute::Native::Trait::BEGIN@197 at line 197 of Moose/Meta/Attribute/Native/Trait.pm # once (44µs+606µs) by Moose::Meta::Method::Accessor::Native::BEGIN@144 at line 144 of Moose/Meta/Method/Accessor/Native.pm # once (44µs+579µs) by MooseX::StrictConstructor::Role::Object::BEGIN@32 at line 32 of MooseX/StrictConstructor/Role/Object.pm # once (70µs+530µs) by MooseX::Role::Parameterized::Parameters::BEGIN@7 at line 7 of MooseX/Role/Parameterized/Parameters.pm # once (47µs+546µs) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@131 at line 131 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm # once (43µs+516µs) by MooseX::Role::Parameterized::Meta::Parameter::BEGIN@27 at line 27 of MooseX/Role/Parameterized/Meta/Parameter.pm
return sub {
5501503.82ms my $caller = scalar caller();
551 Moose::Exporter->_remove_keywords(
552 $caller,
5537552.4ms [ keys %{$exports} ],
# spent 52.4ms making 75 calls to Moose::Exporter::_remove_keywords, avg 698µs/call
554 $export_recorder,
555 $is_reexport,
556 );
557 };
558}
559
560
# spent 52.4ms (51.4+942µs) within Moose::Exporter::_remove_keywords which was called 75 times, avg 698µs/call: # 75 times (51.4ms+942µs) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:557] at line 553, avg 698µs/call
sub _remove_keywords {
5614502.55ms shift;
562 my $package = shift;
563 my $keywords = shift;
564 my $recorded_exports = shift;
565 my $is_reexport = shift;
566
5673320µs2239µs
# spent 147µs (56+92) within Moose::Exporter::BEGIN@567 which was called: # once (56µs+92µs) by Moose::BEGIN@15 at line 567
no strict 'refs';
# spent 147µs making 1 call to Moose::Exporter::BEGIN@567 # spent 91µs making 1 call to strict::unimport
568
569 foreach my $name ( @{$keywords} ) {
570522345.8ms if ( defined &{ $package . '::' . $name } ) {
571 my $sub = \&{ $package . '::' . $name };
572
573 # make sure it is from us
574 next unless $recorded_exports->{$sub};
575
5761484.44ms if ( $is_reexport->{$name} ) {
57731.53ms2203µs
# spent 125µs (47+78) within Moose::Exporter::BEGIN@577 which was called: # once (47µs+78µs) by Moose::BEGIN@15 at line 577
no strict 'refs';
# spent 125µs making 1 call to Moose::Exporter::BEGIN@577 # spent 78µs making 1 call to strict::unimport
578 next
579 unless _export_is_flagged(
580148942µs \*{ join q{::} => $package, $name } );
# spent 942µs making 148 calls to Moose::Exporter::_export_is_flagged, avg 6µs/call
581 }
582
583 # and if it is from us, then undef the slot
584 delete ${ $package . '::' }{$name};
585 }
586 }
587}
588
589
# spent 693µs within Moose::Exporter::_make_init_meta which was called 7 times, avg 99µs/call: # 7 times (693µs+0s) by Moose::Exporter::build_import_methods at line 70, avg 99µs/call
sub _make_init_meta {
59065492µs shift;
591 my $class = shift;
592 my $args = shift;
593
594 my %old_style_roles;
595 for my $role (
596 map {"${_}_roles"}
597 qw(
598 metaclass
599 attribute_metaclass
600 method_metaclass
601 wrapped_method_metaclass
602 instance_metaclass
603 constructor_class
604 destructor_class
605 error_class
606 )
607 ) {
60856226µs $old_style_roles{$role} = $args->{$role}
609 if exists $args->{$role};
610 }
611
612 my %base_class_roles;
613 %base_class_roles = ( roles => $args->{base_class_roles} )
614 if exists $args->{base_class_roles};
615
616 my %new_style_roles = map { $_ => $args->{$_} }
617 grep { exists $args->{$_} } qw( class_metaroles role_metaroles );
618
619 return unless %new_style_roles || %old_style_roles || %base_class_roles;
620
621
# spent 1.08s (5.72ms+1.07) within Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:643] which was called 42 times, avg 25.7ms/call: # 42 times (5.72ms+1.07s) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:456] at line 423, avg 25.7ms/call
return sub {
6222525.20ms shift;
623 my %options = @_;
624
625421.53ms return unless Class::MOP::class_of( $options{for_class} );
# spent 1.53ms making 42 calls to Class::MOP::class_of, avg 36µs/call
626
62711.62ms84774ms if ( %new_style_roles || %old_style_roles ) {
# spent 772ms making 42 calls to Moose::Util::MetaRole::apply_metaroles, avg 18.4ms/call # spent 2.80ms making 42 calls to Class::MOP::Class::DESTROY, avg 67µs/call
628 Moose::Util::MetaRole::apply_metaroles(
629 for => $options{for_class},
630 %new_style_roles,
631 %old_style_roles,
632 );
633 }
634
635 Moose::Util::MetaRole::apply_base_class_roles(
636126299ms for_class => $options{for_class},
# spent 297ms making 42 calls to Moose::Util::MetaRole::apply_base_class_roles, avg 7.07ms/call # spent 1.45ms making 42 calls to Class::MOP::class_of, avg 34µs/call # spent 306µs making 42 calls to UNIVERSAL::isa, avg 7µs/call
637 %base_class_roles,
638 )
639 if Class::MOP::class_of( $options{for_class} )
640 ->isa('Moose::Meta::Class');
641
642421.17ms return Class::MOP::class_of( $options{for_class} );
# spent 1.17ms making 42 calls to Class::MOP::class_of, avg 28µs/call
643 };
644}
645
646
# spent 1.01ms (380µs+626µs) within Moose::Exporter::import which was called 7 times, avg 144µs/call: # once (70µs+126µs) by Moose::BEGIN@15 at line 15 of Moose.pm # once (109µs+85µs) by MooseX::Role::Parameterized::BEGIN@4 at line 4 of MooseX/Role/Parameterized.pm # once (42µs+94µs) by Moose::Role::BEGIN@17 at line 17 of Moose/Role.pm # once (39µs+84µs) by MooseX::SemiAffordanceAccessor::BEGIN@10 at line 10 of MooseX/SemiAffordanceAccessor.pm # once (42µs+80µs) by Moose::Util::TypeConstraints::BEGIN@7 at line 7 of Moose/Util/TypeConstraints.pm # once (40µs+80µs) by MooseX::StrictConstructor::BEGIN@10 at line 10 of MooseX/StrictConstructor.pm # once (38µs+78µs) by MooseX::Types::CheckedUtilExports::BEGIN@14 at line 14 of MooseX/Types/CheckedUtilExports.pm
sub import {
64714279µs7102µs strict->import;
# spent 102µs making 7 calls to strict::import, avg 15µs/call
6487524µs warnings->import;
# spent 524µs making 7 calls to warnings::import, avg 75µs/call
649}
650
651135µs1;
652
653__END__
 
# spent 942µs within Moose::Exporter::_export_is_flagged which was called 148 times, avg 6µs/call: # 148 times (942µs+0s) by Moose::Exporter::_remove_keywords at line 580, avg 6µs/call
sub Moose::Exporter::_export_is_flagged; # xsub
# spent 1.74ms within Moose::Exporter::_flag_as_reexport which was called 249 times, avg 7µs/call: # 249 times (1.74ms+0s) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:125] at line 123, avg 7µs/call
sub Moose::Exporter::_flag_as_reexport; # xsub