← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/pan_genome_post_analysis
  Run on Fri Mar 27 11:43:32 2015
Reported on Fri Mar 27 11:45:32 2015

Filename/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm
StatementsExecuted 7631 statements in 18.8ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1116.34ms125msMoose::Exporter::::BEGIN@8Moose::Exporter::BEGIN@8
22111.77ms14.0msMoose::Exporter::::__ANON__[:140]Moose::Exporter::__ANON__[:140]
17111.66ms1.70msMoose::Exporter::::_remove_keywordsMoose::Exporter::_remove_keywords
160111.52ms2.73msMoose::Exporter::::__ANON__[:389]Moose::Exporter::__ANON__[:389]
1111.33ms8.39msMoose::Exporter::::BEGIN@10Moose::Exporter::BEGIN@10
16011897µs897µsMoose::Exporter::::_late_curry_wrapperMoose::Exporter::_late_curry_wrapper
19111778µs1.92msMoose::Exporter::::__ANON__[:252]Moose::Exporter::__ANON__[:252]
2211473µs473µsMoose::Exporter::::_collect_metarolesMoose::Exporter::_collect_metaroles
311444µs697µsMoose::Exporter::::_make_sub_exporter_paramsMoose::Exporter::_make_sub_exporter_params
2211332µs1.03msMoose::Exporter::::_apply_metarolesMoose::Exporter::_apply_metaroles
2211269µs391µsMoose::Exporter::::_strip_traitsMoose::Exporter::_strip_traits
311221µs2.97msMoose::Exporter::::build_import_methodsMoose::Exporter::build_import_methods
2211182µs212µsMoose::Exporter::::_strip_metaclassMoose::Exporter::_strip_metaclass
4421167µs372µsMoose::Exporter::::__ANON__[:39]Moose::Exporter::__ANON__[:39]
12211164µs164µsMoose::Exporter::::__ANON__[:317]Moose::Exporter::__ANON__[:317]
2211162µs194µsMoose::Exporter::::_strip_meta_nameMoose::Exporter::_strip_meta_name
4431151µs151µsMoose::Exporter::::_sub_from_packageMoose::Exporter::_sub_from_package
2211103µs103µsMoose::Exporter::::_get_callerMoose::Exporter::_get_caller
161162µs62µsMoose::Exporter::::_make_wrapped_sub_with_metaMoose::Exporter::_make_wrapped_sub_with_meta
401157µs57µsMoose::Exporter::::_flag_as_reexportMoose::Exporter::_flag_as_reexport (xsub)
31153µs53µsMoose::Exporter::::_make_init_metaMoose::Exporter::_make_init_meta
33348µs3.02msMoose::Exporter::::setup_import_methodsMoose::Exporter::setup_import_methods
341146µs46µsMoose::Exporter::::_export_is_flaggedMoose::Exporter::_export_is_flagged (xsub)
31143µs1.44msMoose::Exporter::::_make_exporterMoose::Exporter::_make_exporter
31137µs134µsMoose::Exporter::::_follow_alsoMoose::Exporter::_follow_also
33336µs108µsMoose::Exporter::::importMoose::Exporter::import
31134µs57µsMoose::Exporter::::_die_if_cycle_found_in_also_list_for_packageMoose::Exporter::_die_if_cycle_found_in_also_list_for_package
11132µs117µsMoose::Exporter::::BEGIN@11Moose::Exporter::BEGIN@11
11131µs280µsMoose::Exporter::::BEGIN@12Moose::Exporter::BEGIN@12
31126µs26µsMoose::Exporter::::_make_import_subMoose::Exporter::_make_import_sub
281124µs24µsMoose::Exporter::::CORE:matchMoose::Exporter::CORE:match (opcode)
11120µs41µsMoose::Exporter::::BEGIN@4Moose::Exporter::BEGIN@4
11119µs36µsMoose::Exporter::::BEGIN@331Moose::Exporter::BEGIN@331
11119µs48µsMoose::Exporter::::BEGIN@135Moose::Exporter::BEGIN@135
62119µs19µsMoose::Exporter::::_also_list_for_packageMoose::Exporter::_also_list_for_package
11118µs83µsMoose::Exporter::::BEGIN@9Moose::Exporter::BEGIN@9
31118µs18µsMoose::Exporter::::_make_unimport_subMoose::Exporter::_make_unimport_sub
31118µs23µsMoose::Exporter::::_follow_also_realMoose::Exporter::_follow_also_real
11117µs39µsMoose::Exporter::::BEGIN@725Moose::Exporter::BEGIN@725
31116µs16µsMoose::Exporter::::_parse_trait_aliasesMoose::Exporter::_parse_trait_aliases
11116µs61µsMoose::Exporter::::BEGIN@13Moose::Exporter::BEGIN@13
11115µs273µsMoose::Exporter::::BEGIN@15Moose::Exporter::BEGIN@15
11115µs37µsMoose::Exporter::::BEGIN@136Moose::Exporter::BEGIN@136
11113µs30µsMoose::Exporter::::BEGIN@735Moose::Exporter::BEGIN@735
11112µs46µsMoose::Exporter::::BEGIN@7Moose::Exporter::BEGIN@7
11112µs18µsMoose::Exporter::::BEGIN@5Moose::Exporter::BEGIN@5
3119µs9µsMoose::Exporter::::_die_if_also_list_cycles_back_to_existing_stackMoose::Exporter::_die_if_also_list_cycles_back_to_existing_stack
0000s0sMoose::Exporter::::__ANON__[:228]Moose::Exporter::__ANON__[:228]
0000s0sMoose::Exporter::::__ANON__[:366]Moose::Exporter::__ANON__[:366]
0000s0sMoose::Exporter::::__ANON__[:398]Moose::Exporter::__ANON__[:398]
0000s0sMoose::Exporter::::__ANON__[:420]Moose::Exporter::__ANON__[:420]
0000s0sMoose::Exporter::::__ANON__[:528]Moose::Exporter::__ANON__[:528]
0000s0sMoose::Exporter::::__ANON__[:532]Moose::Exporter::__ANON__[:532]
0000s0sMoose::Exporter::::__ANON__[:546]Moose::Exporter::__ANON__[:546]
0000s0sMoose::Exporter::::__ANON__[:558]Moose::Exporter::__ANON__[:558]
0000s0sMoose::Exporter::::__ANON__[:715]Moose::Exporter::__ANON__[:715]
0000s0sMoose::Exporter::::__ANON__[:787]Moose::Exporter::__ANON__[:787]
0000s0sMoose::Exporter::::_apply_meta_traitsMoose::Exporter::_apply_meta_traits
0000s0sMoose::Exporter::::_curry_wrapperMoose::Exporter::_curry_wrapper
0000s0sMoose::Exporter::::_make_wrapped_subMoose::Exporter::_make_wrapped_sub
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;
211µsour $VERSION = '2.1403';
3
4237µs262µs
# spent 41µs (20+21) within Moose::Exporter::BEGIN@4 which was called: # once (20µs+21µs) by Moose::BEGIN@15 at line 4
use strict;
# spent 41µs making 1 call to Moose::Exporter::BEGIN@4 # spent 21µs making 1 call to strict::import
5239µs225µs
# spent 18µs (12+7) within Moose::Exporter::BEGIN@5 which was called: # once (12µs+7µs) by Moose::BEGIN@15 at line 5
use warnings;
# spent 18µs making 1 call to Moose::Exporter::BEGIN@5 # spent 7µs making 1 call to warnings::import
6
7237µs281µs
# spent 46µs (12+35) within Moose::Exporter::BEGIN@7 which was called: # once (12µs+35µs) by Moose::BEGIN@15 at line 7
use Class::Load qw(is_class_loaded);
# spent 46µs making 1 call to Moose::Exporter::BEGIN@7 # spent 35µs making 1 call to Exporter::import
82182µs1125ms
# spent 125ms (6.34+119) within Moose::Exporter::BEGIN@8 which was called: # once (6.34ms+119ms) by Moose::BEGIN@15 at line 8
use Class::MOP;
# spent 125ms making 1 call to Moose::Exporter::BEGIN@8
92129µs2147µs
# spent 83µs (18+64) within Moose::Exporter::BEGIN@9 which was called: # once (18µs+64µs) by Moose::BEGIN@15 at line 9
use List::MoreUtils qw( first_index uniq );
# spent 83µs making 1 call to Moose::Exporter::BEGIN@9 # spent 64µs making 1 call to Exporter::import
102305µs18.39ms
# spent 8.39ms (1.33+7.06) within Moose::Exporter::BEGIN@10 which was called: # once (1.33ms+7.06ms) by Moose::BEGIN@15 at line 10
use Moose::Util::MetaRole;
# spent 8.39ms making 1 call to Moose::Exporter::BEGIN@10
113208µs3202µs
# spent 117µs (32+85) within Moose::Exporter::BEGIN@11 which was called: # once (32µs+85µs) by Moose::BEGIN@15 at line 11
use Scalar::Util 1.11 qw(reftype);
# spent 117µs making 1 call to Moose::Exporter::BEGIN@11 # spent 60µs making 1 call to Exporter::import # spent 24µs making 1 call to UNIVERSAL::VERSION
12392µs3529µs
# spent 280µs (31+249) within Moose::Exporter::BEGIN@12 which was called: # once (31µs+249µs) by Moose::BEGIN@15 at line 12
use Sub::Exporter 0.980;
# spent 280µs making 1 call to Moose::Exporter::BEGIN@12 # spent 233µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337] # spent 16µs making 1 call to UNIVERSAL::VERSION
13248µs2106µs
# spent 61µs (16+45) within Moose::Exporter::BEGIN@13 which was called: # once (16µs+45µs) by Moose::BEGIN@15 at line 13
use Sub::Name qw(subname);
# spent 61µs making 1 call to Moose::Exporter::BEGIN@13 # spent 45µs making 1 call to Exporter::import
14
152796µs2532µs
# spent 273µs (15+258) within Moose::Exporter::BEGIN@15 which was called: # once (15µs+258µs) by Moose::BEGIN@15 at line 15
use Moose::Util 'throw_exception';
# spent 273µs making 1 call to Moose::Exporter::BEGIN@15 # spent 258µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
16
171200nsmy %EXPORT_SPEC;
18
19
# spent 3.02ms (48µs+2.97) within Moose::Exporter::setup_import_methods which was called 3 times, avg 1.01ms/call: # once (20µs+1.16ms) by Moose::Meta::Attribute::BEGIN@16 at line 38 of Moose/Util/TypeConstraints.pm # once (13µs+938µs) by Bio::Roary::ClustersRole::BEGIN@11 at line 94 of Moose/Role.pm # once (15µs+869µs) by Bio::Roary::CommandLine::RoaryPostAnalysis::BEGIN@11 at line 132 of Moose.pm
sub setup_import_methods {
20942µs my ( $class, %args ) = @_;
21
22 $args{exporting_package} ||= caller();
23
2432.97ms $class->build_import_methods(
# spent 2.97ms making 3 calls to Moose::Exporter::build_import_methods, avg 991µs/call
25 %args,
26 install => [qw(import unimport init_meta)]
27 );
28}
29
30# A reminder to intrepid Moose hackers
31# there may be more than one level of exporter
32# don't make doy cry. -- perigrin
33
34
# spent 2.97ms (221µs+2.75) within Moose::Exporter::build_import_methods which was called 3 times, avg 991µs/call: # 3 times (221µs+2.75ms) by Moose::Exporter::setup_import_methods at line 24, avg 991µs/call
sub build_import_methods {
3548138µs my ( $class, %args ) = @_;
36
37 my $exporting_package = $args{exporting_package} ||= caller();
38
3944148µs44205µs
# spent 372µs (167+205) within Moose::Exporter::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm:39] which was called 44 times, avg 8µs/call: # 22 times (96µs+100µs) by Moose::Exporter::_apply_metaroles at line 575, avg 9µs/call # 22 times (70µs+106µs) by Moose::Exporter::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm:140] at line 111, avg 8µs/call
my $meta_lookup = $args{meta_lookup} || sub { Class::MOP::class_of(shift) };
# spent 205µs making 44 calls to Class::MOP::class_of, avg 5µs/call
40
41 $EXPORT_SPEC{$exporting_package} = \%args;
42
433134µs my @exports_from = $class->_follow_also($exporting_package);
# spent 134µs making 3 calls to Moose::Exporter::_follow_also, avg 45µs/call
44
45 my $export_recorder = {};
46 my $is_reexport = {};
47
483697µs my $exports = $class->_make_sub_exporter_params(
# spent 697µs making 3 calls to Moose::Exporter::_make_sub_exporter_params, avg 232µs/call
49 [ $exporting_package, @exports_from ],
50 $export_recorder,
51 $is_reexport,
52 $args{meta_lookup}, # so that we don't pass through the default
53 );
54
5531.44ms my $exporter = $class->_make_exporter(
# spent 1.44ms making 3 calls to Moose::Exporter::_make_exporter, avg 480µs/call
56 $exports,
57 $is_reexport,
58 $meta_lookup,
59 );
60
61 my %methods;
62326µs $methods{import} = $class->_make_import_sub(
# spent 26µs making 3 calls to Moose::Exporter::_make_import_sub, avg 9µs/call
63 $exporting_package,
64 $exporter,
65 \@exports_from,
66 $is_reexport,
67 $meta_lookup,
68 );
69
70318µs $methods{unimport} = $class->_make_unimport_sub(
# spent 18µs making 3 calls to Moose::Exporter::_make_unimport_sub, avg 6µs/call
71 $exporting_package,
72 $exports,
73 $export_recorder,
74 $is_reexport,
75 $meta_lookup,
76 );
77
78353µs $methods{init_meta} = $class->_make_init_meta(
# spent 53µs making 3 calls to Moose::Exporter::_make_init_meta, avg 18µs/call
79 $exporting_package,
80 \%args,
81 $meta_lookup,
82 );
83
843124µs my $package = Class::MOP::Package->initialize($exporting_package);
# spent 124µs making 3 calls to Class::MOP::Package::initialize, avg 41µs/call
85 for my $to_install ( @{ $args{install} || [] } ) {
862463µs my $symbol = '&' . $to_install;
87
88 next
896145µs unless $methods{$to_install}
# spent 145µs making 6 calls to Class::MOP::Package::has_package_symbol, avg 24µs/call
90 && !$package->has_package_symbol($symbol);
9112114µs $package->add_package_symbol(
# spent 99µs making 6 calls to Class::MOP::Package::add_package_symbol, avg 16µs/call # spent 15µs making 6 calls to Sub::Name::subname, avg 2µs/call
92 $symbol,
93 subname(
94 $exporting_package . '::' . $to_install, $methods{$to_install}
95 )
96 );
97 }
98
99 return ( $methods{import}, $methods{unimport}, $methods{init_meta} );
100}
101
102
# spent 1.44ms (43µs+1.40) within Moose::Exporter::_make_exporter which was called 3 times, avg 480µs/call: # 3 times (43µs+1.40ms) by Moose::Exporter::build_import_methods at line 55, avg 480µs/call
sub _make_exporter {
103644µs my ($class, $exports, $is_reexport, $meta_lookup) = @_;
104
105 return Sub::Exporter::build_exporter(
106 {
107 exports => $exports,
108 groups => { default => [':all'] },
109
# spent 14.0ms (1.77+12.2) within Moose::Exporter::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm:140] which was called 22 times, avg 636µs/call: # 22 times (1.77ms+12.2ms) by Sub::Exporter::_do_import at line 380 of Sub/Exporter.pm, avg 636µs/call
installer => sub {
110166366µs my ($arg, $to_export) = @_;
11122176µs my $meta = $meta_lookup->($arg->{into});
# spent 176µs making 22 calls to Moose::Exporter::__ANON__[Moose/Exporter.pm:39], avg 8µs/call
112
11321.21ms goto &Sub::Exporter::default_installer unless $meta;
# spent 1.21ms making 2 calls to Sub::Exporter::default_installer, avg 606µs/call
114
115 # don't overwrite existing symbols with our magically flagged
116 # version of it if we would install the same sub that's already
117 # in the importer
118
119 my @filtered_to_export;
120 my %installed;
121984855µs for (my $i = 0; $i < @{ $to_export }; $i += 2) {
122 my ($as, $cv) = @{ $to_export }[$i, $i + 1];
123
1242462.13ms next if !ref($as)
# spent 2.13ms making 246 calls to Class::MOP::Package::has_package_symbol, avg 9µs/call
125 && $meta->has_package_symbol('&' . $as)
126 && $meta->get_package_symbol('&' . $as) == $cv;
127
128 push @filtered_to_export, $as, $cv;
129 $installed{$as} = 1 unless ref $as;
130 }
131
132209.86ms Sub::Exporter::default_installer($arg, \@filtered_to_export);
# spent 9.86ms making 20 calls to Sub::Exporter::default_installer, avg 493µs/call
133
134 for my $name ( keys %{$is_reexport} ) {
135253µs277µs
# spent 48µs (19+29) within Moose::Exporter::BEGIN@135 which was called: # once (19µs+29µs) by Moose::BEGIN@15 at line 135
no strict 'refs';
# spent 48µs making 1 call to Moose::Exporter::BEGIN@135 # spent 29µs making 1 call to strict::unimport
13621.39ms258µs
# spent 37µs (15+22) within Moose::Exporter::BEGIN@136 which was called: # once (15µs+22µs) by Moose::BEGIN@15 at line 136
no warnings 'once';
# spent 37µs making 1 call to Moose::Exporter::BEGIN@136 # spent 22µs making 1 call to warnings::unimport
13780247µs next unless exists $installed{$name};
1384057µs _flag_as_reexport( \*{ join q{::}, $arg->{into}, $name } );
# spent 57µs making 40 calls to Moose::Exporter::_flag_as_reexport, avg 1µs/call
139 }
140 },
141 }
14231.40ms );
# spent 1.40ms making 3 calls to Sub::Exporter::build_exporter, avg 466µs/call
143}
144
145
# spent 134µs (37+98) within Moose::Exporter::_follow_also which was called 3 times, avg 45µs/call: # 3 times (37µs+98µs) by Moose::Exporter::build_import_methods at line 43, avg 45µs/call
sub _follow_also {
1461249µs my $class = shift;
147 my $exporting_package = shift;
148
149357µs _die_if_cycle_found_in_also_list_for_package($exporting_package);
# spent 57µs making 3 calls to Moose::Exporter::_die_if_cycle_found_in_also_list_for_package, avg 19µs/call
150
151641µs return uniq( _follow_also_real($exporting_package) );
# spent 23µs making 3 calls to Moose::Exporter::_follow_also_real, avg 8µs/call # spent 17µs making 3 calls to List::MoreUtils::uniq, avg 6µs/call
152}
153
154
# spent 23µs (18+6) within Moose::Exporter::_follow_also_real which was called 3 times, avg 8µs/call: # 3 times (18µs+6µs) by Moose::Exporter::_follow_also at line 151, avg 8µs/call
sub _follow_also_real {
155915µs my $exporting_package = shift;
15636µs my @also = _also_list_for_package($exporting_package);
# spent 6µs making 3 calls to Moose::Exporter::_also_list_for_package, avg 2µs/call
157
158 return map { $_, _follow_also_real($_) } @also;
159}
160
161
# spent 19µs within Moose::Exporter::_also_list_for_package which was called 6 times, avg 3µs/call: # 3 times (14µs+0s) by Moose::Exporter::_die_if_cycle_found_in_also_list_for_package at line 183, avg 4µs/call # 3 times (6µs+0s) by Moose::Exporter::_follow_also_real at line 156, avg 2µs/call
sub _also_list_for_package {
1622431µs my $package = shift;
163
164 if ( !exists $EXPORT_SPEC{$package} ) {
165 my $loaded = is_class_loaded($package);
166
167 throw_exception( PackageDoesNotUseMooseExporter => package => $package,
168 is_loaded => $loaded
169 );
170 }
171
172 my $also = $EXPORT_SPEC{$package}{also};
173
174 return unless defined $also;
175
176 return ref $also ? @$also : $also;
177}
178
179# this is no Tarjan algorithm, but for the list sizes expected,
180# brute force will probably be fine (and more maintainable)
181
# spent 57µs (34+22) within Moose::Exporter::_die_if_cycle_found_in_also_list_for_package which was called 3 times, avg 19µs/call: # 3 times (34µs+22µs) by Moose::Exporter::_follow_also at line 149, avg 19µs/call
sub _die_if_cycle_found_in_also_list_for_package {
182623µs my $package = shift;
183622µs _die_if_also_list_cycles_back_to_existing_stack(
# spent 14µs making 3 calls to Moose::Exporter::_also_list_for_package, avg 4µs/call # spent 9µs making 3 calls to Moose::Exporter::_die_if_also_list_cycles_back_to_existing_stack, avg 3µs/call
184 [ _also_list_for_package($package) ],
185 [$package],
186 );
187}
188
189
# spent 9µs within Moose::Exporter::_die_if_also_list_cycles_back_to_existing_stack which was called 3 times, avg 3µs/call: # 3 times (9µs+0s) by Moose::Exporter::_die_if_cycle_found_in_also_list_for_package at line 183, avg 3µs/call
sub _die_if_also_list_cycles_back_to_existing_stack {
190613µs my ( $also_list, $existing_stack ) = @_;
191
192 return unless @$also_list && @$existing_stack;
193
194 for my $also_member (@$also_list) {
195 for my $stack_member (@$existing_stack) {
196 next unless $also_member eq $stack_member;
197
198 throw_exception( CircularReferenceInAlso => also_parameter => $also_member,
199 stack => $existing_stack
200 );
201 }
202
203 _die_if_also_list_cycles_back_to_existing_stack(
204 [ _also_list_for_package($also_member) ],
205 [ $also_member, @$existing_stack ],
206 );
207 }
208}
209
210
# spent 16µs within Moose::Exporter::_parse_trait_aliases which was called 3 times, avg 6µs/call: # 3 times (16µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 281, avg 6µs/call
sub _parse_trait_aliases {
2111519µs my $class = shift;
212 my ($package, $aliases) = @_;
213
214 my @ret;
215 for my $alias (@$aliases) {
216 my $name;
217 if (ref($alias)) {
218 reftype($alias) eq 'ARRAY'
219 or throw_exception( InvalidArgumentsToTraitAliases => class_name => $class,
220 package_name => $package,
221 alias => $alias
222 );
223 ($alias, $name) = @$alias;
224 }
225 else {
226 ($name = $alias) =~ s/.*:://;
227 }
228 push @ret, subname "${package}::${name}" => sub () { $alias };
229 }
230
231 return @ret;
232}
233
234
# spent 697µs (444+254) within Moose::Exporter::_make_sub_exporter_params which was called 3 times, avg 232µs/call: # 3 times (444µs+254µs) by Moose::Exporter::build_import_methods at line 48, avg 232µs/call
sub _make_sub_exporter_params {
2352721µs my $class = shift;
236 my $packages = shift;
237 my $export_recorder = shift;
238 my $is_reexport = shift;
239 my $meta_lookup_override = shift;
240
241 my %exports;
242 my $current_meta_lookup;
243
244 for my $package ( @{$packages} ) {
2452439µs my $args = $EXPORT_SPEC{$package}
246 or die "The $package package does not use Moose::Exporter\n";
247
248 $current_meta_lookup = $meta_lookup_override || $args->{meta_lookup};
249 $meta_lookup_override = $current_meta_lookup;
250
251 my $meta_lookup = $current_meta_lookup
252191630µs1911.14ms
# spent 1.92ms (778µs+1.14) within Moose::Exporter::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm:252] which was called 191 times, avg 10µs/call: # 191 times (778µs+1.14ms) by Moose::Role::has or Moose::before or Moose::extends or Moose::has or Moose::with at line 418, avg 10µs/call
|| sub { Class::MOP::class_of(shift) };
# spent 1.14ms making 191 calls to Class::MOP::class_of, avg 6µs/call
253
254 for my $name ( @{ $args->{with_meta} } ) {
2554873µs1652µs my $sub = $class->_sub_from_package( $package, $name )
# spent 52µs making 16 calls to Moose::Exporter::_sub_from_package, avg 3µs/call
256 or next;
257
258 my $fq_name = $package . '::' . $name;
259
2601662µs $exports{$name} = $class->_make_wrapped_sub_with_meta(
# spent 62µs making 16 calls to Moose::Exporter::_make_wrapped_sub_with_meta, avg 4µs/call
261 $fq_name,
262 $sub,
263 $export_recorder,
264 $meta_lookup,
265 ) unless exists $exports{$name};
266 }
267
268 for my $name ( @{ $args->{with_caller} } ) {
269 my $sub = $class->_sub_from_package( $package, $name )
270 or next;
271
272 my $fq_name = $package . '::' . $name;
273
274 $exports{$name} = $class->_make_wrapped_sub(
275 $fq_name,
276 $sub,
277 $export_recorder,
278 ) unless exists $exports{$name};
279 }
280
281316µs my @extra_exports = $class->_parse_trait_aliases(
# spent 16µs making 3 calls to Moose::Exporter::_parse_trait_aliases, avg 6µs/call
282 $package, $args->{trait_aliases},
283 );
284 for my $name ( @{ $args->{as_is} }, @extra_exports ) {
285112160µs my ( $sub, $coderef_name );
286
2876077µs2824µs if ( ref $name ) {
# spent 24µs making 28 calls to Moose::Exporter::CORE:match, avg 850ns/call
288 $sub = $name;
289
290 my $coderef_pkg;
291 ( $coderef_pkg, $coderef_name )
292 = Class::MOP::get_code_info($name);
293
294 if ( $coderef_pkg ne $package ) {
295 $is_reexport->{$coderef_name} = 1;
296 }
297 }
298 elsif ( $name =~ /^(.*)::([^:]+)$/ ) {
299414µs $sub = $class->_sub_from_package( "$1", "$2" )
# spent 14µs making 4 calls to Moose::Exporter::_sub_from_package, avg 4µs/call
300 or next;
301
302 $coderef_name = "$2";
303
304 if ( $1 ne $package ) {
305 $is_reexport->{$coderef_name} = 1;
306 }
307 }
308 else {
3092484µs $sub = $class->_sub_from_package( $package, $name )
# spent 84µs making 24 calls to Moose::Exporter::_sub_from_package, avg 4µs/call
310 or next;
311
312 $coderef_name = $name;
313 }
314
315 $export_recorder->{$sub} = 1;
316
317122230µs
# spent 164µs within Moose::Exporter::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm:317] which was called 122 times, avg 1µs/call: # 122 times (164µs+0s) by Sub::Exporter::default_generator at line 419 of Sub/Exporter.pm, avg 1µs/call
$exports{$coderef_name} = sub { $sub }
318 unless exists $exports{$coderef_name};
319 }
320 }
321
322 return \%exports;
323}
324
325
# spent 151µs within Moose::Exporter::_sub_from_package which was called 44 times, avg 3µs/call: # 24 times (84µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 309, avg 4µs/call # 16 times (52µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 255, avg 3µs/call # 4 times (14µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 299, avg 4µs/call
sub _sub_from_package {
326220121µs my $sclass = shift;
327 my $package = shift;
328 my $name = shift;
329
3304442µs my $sub = do {
33122.50ms254µs
# spent 36µs (19+17) within Moose::Exporter::BEGIN@331 which was called: # once (19µs+17µs) by Moose::BEGIN@15 at line 331
no strict 'refs';
# spent 36µs making 1 call to Moose::Exporter::BEGIN@331 # spent 17µs making 1 call to strict::unimport
332 \&{ $package . '::' . $name };
333 };
334
335 return $sub if defined &$sub;
336
337 Carp::cluck "Trying to export undefined sub ${package}::${name}";
338
339 return;
340}
341
3421100nsour $CALLER;
343
344sub _make_wrapped_sub {
345 my $self = shift;
346 my $fq_name = shift;
347 my $sub = shift;
348 my $export_recorder = shift;
349
350 # We need to set the package at import time, so that when
351 # package Foo imports has(), we capture "Foo" as the
352 # package. This lets other packages call Foo::has() and get
353 # the right package. This is done for backwards compatibility
354 # with existing production code, not because this is a good
355 # idea ;)
356 return sub {
357 my $caller = $CALLER;
358
359 my $wrapper = $self->_curry_wrapper( $sub, $fq_name, $caller );
360
361 my $sub = subname( $fq_name => $wrapper );
362
363 $export_recorder->{$sub} = 1;
364
365 return $sub;
366 };
367}
368
369
# spent 62µs within Moose::Exporter::_make_wrapped_sub_with_meta which was called 16 times, avg 4µs/call: # 16 times (62µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 260, avg 4µs/call
sub _make_wrapped_sub_with_meta {
3709671µs my $self = shift;
371 my $fq_name = shift;
372 my $sub = shift;
373 my $export_recorder = shift;
374 my $meta_lookup = shift;
375
376
# spent 2.73ms (1.52+1.21) within Moose::Exporter::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm:389] which was called 160 times, avg 17µs/call: # 160 times (1.52ms+1.21ms) by Sub::Exporter::default_generator at line 419 of Sub/Exporter.pm, avg 17µs/call
return sub {
3778001.62ms my $caller = $CALLER;
378
379160897µs my $wrapper = $self->_late_curry_wrapper(
# spent 897µs making 160 calls to Moose::Exporter::_late_curry_wrapper, avg 6µs/call
380 $sub, $fq_name,
381 $meta_lookup => $caller
382 );
383
384160309µs my $sub = subname( $fq_name => $wrapper );
# spent 309µs making 160 calls to Sub::Name::subname, avg 2µs/call
385
386 $export_recorder->{$sub} = 1;
387
388 return $sub;
389 };
390}
391
392sub _curry_wrapper {
393 my $class = shift;
394 my $sub = shift;
395 my $fq_name = shift;
396 my @extra = @_;
397
398 my $wrapper = sub { $sub->( @extra, @_ ) };
399 if ( my $proto = prototype $sub ) {
400
401 # XXX - Perl's prototype sucks. Use & to make set_prototype
402 # ignore the fact that we're passing "private variables"
403 &Scalar::Util::set_prototype( $wrapper, $proto );
404 }
405 return $wrapper;
406}
407
408
# spent 897µs within Moose::Exporter::_late_curry_wrapper which was called 160 times, avg 6µs/call: # 160 times (897µs+0s) by Moose::Exporter::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm:389] at line 379, avg 6µs/call
sub _late_curry_wrapper {
4091280998µs my $class = shift;
410 my $sub = shift;
411 my $fq_name = shift;
412 my $extra = shift;
413 my @ex_args = @_;
414
415 my $wrapper = sub {
416
417 # resolve curried arguments at runtime via this closure
4183821.49ms1911.92ms my @curry = ( $extra->(@ex_args) );
# spent 1.92ms making 191 calls to Moose::Exporter::__ANON__[Moose/Exporter.pm:252], avg 10µs/call
419191423ms return $sub->( @curry, @_ );
# spent 351ms making 172 calls to Moose::has, avg 2.04ms/call # spent 62.2ms making 4 calls to Moose::with, avg 15.5ms/call # spent 7.71ms making 1 call to Moose::extends # spent 1.25ms making 13 calls to Moose::Role::has, avg 96µs/call # spent 520µs making 1 call to Moose::before
420 };
421
422 if ( my $proto = prototype $sub ) {
423
424 # XXX - Perl's prototype sucks. Use & to make set_prototype
425 # ignore the fact that we're passing "private variables"
426 &Scalar::Util::set_prototype( $wrapper, $proto );
427 }
428 return $wrapper;
429}
430
431
# spent 26µs within Moose::Exporter::_make_import_sub which was called 3 times, avg 9µs/call: # 3 times (26µs+0s) by Moose::Exporter::build_import_methods at line 62, avg 9µs/call
sub _make_import_sub {
4322127µs shift;
433 my $exporting_package = shift;
434 my $exporter = shift;
435 my $exports_from = shift;
436 my $is_reexport = shift;
437 my $meta_lookup = shift;
438
439 return sub {
440
441 # I think we could use Sub::Exporter's collector feature
442 # to do this, but that would be rather gross, since that
443 # feature isn't really designed to return a value to the
444 # caller of the exporter sub.
445 #
446 # Also, this makes sure we preserve backwards compat for
447 # _get_caller, so it always sees the arguments in the
448 # expected order.
449440856µs my $traits;
45022391µs ( $traits, @_ ) = _strip_traits(@_);
# spent 391µs making 22 calls to Moose::Exporter::_strip_traits, avg 18µs/call
451
452 my $metaclass;
45322212µs ( $metaclass, @_ ) = _strip_metaclass(@_);
# spent 212µs making 22 calls to Moose::Exporter::_strip_metaclass, avg 10µs/call
454 $metaclass
455 = Moose::Util::resolve_metaclass_alias( 'Class' => $metaclass )
456 if defined $metaclass && length $metaclass;
457
458 my $meta_name;
45922194µs ( $meta_name, @_ ) = _strip_meta_name(@_);
# spent 194µs making 22 calls to Moose::Exporter::_strip_meta_name, avg 9µs/call
460
461 # Normally we could look at $_[0], but in some weird cases
462 # (involving goto &Moose::import), $_[0] ends as something
463 # else (like Squirrel).
464 my $class = $exporting_package;
465
46622103µs $CALLER = _get_caller(@_);
# spent 103µs making 22 calls to Moose::Exporter::_get_caller, avg 5µs/call
467
468 # this works because both pragmas set $^H (see perldoc
469 # perlvar) which affects the current compilation -
470 # i.e. the file who use'd us - which is why we don't need
471 # to do anything special to make it affect that file
472 # rather than this one (which is already compiled)
473
47422371µs strict->import;
# spent 371µs making 22 calls to strict::import, avg 17µs/call
47522163µs warnings->import;
# spent 163µs making 22 calls to warnings::import, avg 7µs/call
476
477 my $did_init_meta;
47822147µs2250µs for my $c ( grep { $_->can('init_meta') } $class, @{$exports_from} ) {
# spent 50µs making 22 calls to UNIVERSAL::can, avg 2µs/call
479
480 # init_meta can apply a role, which when loaded uses
481 # Moose::Exporter, which in turn sets $CALLER, so we need
482 # to protect against that.
4836096µs local $CALLER = $CALLER;
4842056.7ms $c->init_meta(
# spent 51.9ms making 17 calls to Moose::init_meta, avg 3.06ms/call # spent 4.76ms making 3 calls to Moose::Role::init_meta, avg 1.59ms/call
485 for_class => $CALLER,
486 metaclass => $metaclass,
487 meta_name => $meta_name,
488 );
489 $did_init_meta = 1;
490 }
491
492 {
493 # The metaroles will use Moose::Role, which in turn uses
494 # Moose::Exporter, which in turn sets $CALLER, so we need
495 # to protect against that.
4964475µs local $CALLER = $CALLER;
497221.03ms _apply_metaroles(
# spent 1.03ms making 22 calls to Moose::Exporter::_apply_metaroles, avg 47µs/call
498 $CALLER,
499 [$class, @$exports_from],
500 $meta_lookup
501 );
502 }
503
504 if ( $did_init_meta && @{$traits} ) {
505
506 # The traits will use Moose::Role, which in turn uses
507 # Moose::Exporter, which in turn sets $CALLER, so we need
508 # to protect against that.
509 local $CALLER = $CALLER;
510 _apply_meta_traits( $CALLER, $traits, $meta_lookup );
511 }
512 elsif ( @{$traits} ) {
513 throw_exception( ClassDoesNotHaveInitMeta => class_name => $class,
514 traits => $traits
515 );
516 }
517
518 my ( undef, @args ) = @_;
519 my $extra = shift @args if ref $args[0] eq 'HASH';
520
521 $extra ||= {};
5224424µs if ( !$extra->{into} ) {
523 $extra->{into_level} ||= 0;
524 $extra->{into_level}++;
525 }
526
5272234.3ms $class->$exporter( $extra, @args );
# spent 34.3ms making 22 calls to Sub::Exporter::__ANON__[Sub/Exporter.pm:337], avg 1.56ms/call
528 };
529}
530
531
# spent 391µs (269+123) within Moose::Exporter::_strip_traits which was called 22 times, avg 18µs/call: # 22 times (269µs+123µs) by Moose::Role::import or Moose::Util::TypeConstraints::import or Moose::import at line 450, avg 18µs/call
sub _strip_traits {
53266404µs22123µs my $idx = first_index { ( $_ || '' ) eq '-traits' } @_;
# spent 123µs making 22 calls to List::MoreUtils::firstidx, avg 6µs/call
533
534 return ( [], @_ ) unless $idx >= 0 && $#_ >= $idx + 1;
535
536 my $traits = $_[ $idx + 1 ];
537
538 splice @_, $idx, 2;
539
540 $traits = [$traits] unless ref $traits;
541
542 return ( $traits, @_ );
543}
544
545
# spent 212µs (182+30) within Moose::Exporter::_strip_metaclass which was called 22 times, avg 10µs/call: # 22 times (182µs+30µs) by Moose::Role::import or Moose::Util::TypeConstraints::import or Moose::import at line 453, avg 10µs/call
sub _strip_metaclass {
54666207µs2230µs my $idx = first_index { ( $_ || '' ) eq '-metaclass' } @_;
# spent 30µs making 22 calls to List::MoreUtils::firstidx, avg 1µs/call
547
548 return ( undef, @_ ) unless $idx >= 0 && $#_ >= $idx + 1;
549
550 my $metaclass = $_[ $idx + 1 ];
551
552 splice @_, $idx, 2;
553
554 return ( $metaclass, @_ );
555}
556
557
# spent 194µs (162+32) within Moose::Exporter::_strip_meta_name which was called 22 times, avg 9µs/call: # 22 times (162µs+32µs) by Moose::Role::import or Moose::Util::TypeConstraints::import or Moose::import at line 459, avg 9µs/call
sub _strip_meta_name {
55866206µs2232µs my $idx = first_index { ( $_ || '' ) eq '-meta_name' } @_;
# spent 32µs making 22 calls to List::MoreUtils::firstidx, avg 1µs/call
559
560 return ( 'meta', @_ ) unless $idx >= 0 && $#_ >= $idx + 1;
561
562 my $meta_name = $_[ $idx + 1 ];
563
564 splice @_, $idx, 2;
565
566 return ( $meta_name, @_ );
567}
568
569
# spent 1.03ms (332µs+694µs) within Moose::Exporter::_apply_metaroles which was called 22 times, avg 47µs/call: # 22 times (332µs+694µs) by Moose::Role::import or Moose::Util::TypeConstraints::import or Moose::import at line 497, avg 47µs/call
sub _apply_metaroles {
570150307µs my ($class, $exports_from, $meta_lookup) = @_;
571
57222473µs my $metaroles = _collect_metaroles($exports_from);
# spent 473µs making 22 calls to Moose::Exporter::_collect_metaroles, avg 21µs/call
573 my $base_class_roles = delete $metaroles->{base_class_roles};
574
57522196µs my $meta = $meta_lookup->($class);
# spent 196µs making 22 calls to Moose::Exporter::__ANON__[Moose/Exporter.pm:39], avg 9µs/call
576 # for instance, Moose.pm uses Moose::Util::TypeConstraints
577 return unless $meta;
578
579 Moose::Util::MetaRole::apply_metaroles(
580 for => $meta,
581 %$metaroles,
582 ) if keys %$metaroles;
583
5842025µs Moose::Util::MetaRole::apply_base_class_roles(
# spent 25µs making 20 calls to UNIVERSAL::isa, avg 1µs/call
585 for => $meta,
586 roles => $base_class_roles,
587 ) if $meta->isa('Class::MOP::Class')
588 && $base_class_roles && @$base_class_roles;
589}
590
591
# spent 473µs within Moose::Exporter::_collect_metaroles which was called 22 times, avg 21µs/call: # 22 times (473µs+0s) by Moose::Exporter::_apply_metaroles at line 572, avg 21µs/call
sub _collect_metaroles {
592176286µs my ($exports_from) = @_;
593
594 my @old_style_role_types = map { "${_}_roles" } qw(
595 metaclass
596 attribute_metaclass
597 method_metaclass
598 wrapped_method_metaclass
599 instance_metaclass
600 constructor_class
601 destructor_class
602 error_class
603 );
604
605 my %class_metaroles;
606 my %role_metaroles;
607 my @base_class_roles;
608 my %old_style_roles;
609
610 for my $exporter (@$exports_from) {
61111091µs my $data = $EXPORT_SPEC{$exporter};
612
613 if (exists $data->{class_metaroles}) {
614 for my $type (keys %{ $data->{class_metaroles} }) {
615 push @{ $class_metaroles{$type} ||= [] },
616 @{ $data->{class_metaroles}{$type} };
617 }
618 }
619
620 if (exists $data->{role_metaroles}) {
621 for my $type (keys %{ $data->{role_metaroles} }) {
622 push @{ $role_metaroles{$type} ||= [] },
623 @{ $data->{role_metaroles}{$type} };
624 }
625 }
626
627 if (exists $data->{base_class_roles}) {
628 push @base_class_roles, @{ $data->{base_class_roles} };
629 }
630
631 for my $type (@old_style_role_types) {
63217648µs if (exists $data->{$type}) {
633 push @{ $old_style_roles{$type} ||= [] },
634 @{ $data->{$type} };
635 }
636 }
637 }
638
639 return {
640 (keys(%class_metaroles)
641 ? (class_metaroles => \%class_metaroles)
642 : ()),
643 (keys(%role_metaroles)
644 ? (role_metaroles => \%role_metaroles)
645 : ()),
646 (@base_class_roles
647 ? (base_class_roles => \@base_class_roles)
648 : ()),
649 %old_style_roles,
650 };
651}
652
653sub _apply_meta_traits {
654 my ( $class, $traits, $meta_lookup ) = @_;
655
656 return unless @{$traits};
657
658 my $meta = $meta_lookup->($class);
659
660 my $type = $meta->isa('Moose::Meta::Role') ? 'Role'
661 : $meta->isa('Class::MOP::Class') ? 'Class'
662 : confess('Cannot determine metaclass type for '
663 . 'trait application. Meta isa '
664 . ref $meta);
665
666 my @resolved_traits = map {
667 ref $_
668 ? $_
669 : Moose::Util::resolve_metatrait_alias( $type => $_ )
670 } @$traits;
671
672 return unless @resolved_traits;
673
674 my %args = ( for => $class );
675
676 if ( $meta->isa('Moose::Meta::Role') ) {
677 $args{role_metaroles} = { role => \@resolved_traits };
678 }
679 else {
680 $args{class_metaroles} = { class => \@resolved_traits };
681 }
682
683 Moose::Util::MetaRole::apply_metaroles(%args);
684}
685
686
# spent 103µs within Moose::Exporter::_get_caller which was called 22 times, avg 5µs/call: # 22 times (103µs+0s) by Moose::Role::import or Moose::Util::TypeConstraints::import or Moose::import at line 466, avg 5µs/call
sub _get_caller {
687
688 # 1 extra level because it's called by import so there's a layer
689 # of indirection
69044124µs my $offset = 1;
691
692 return
693 ( ref $_[1] && defined $_[1]->{into} ) ? $_[1]->{into}
694 : ( ref $_[1] && defined $_[1]->{into_level} )
695 ? caller( $offset + $_[1]->{into_level} )
696 : caller($offset);
697}
698
699
# spent 18µs within Moose::Exporter::_make_unimport_sub which was called 3 times, avg 6µs/call: # 3 times (18µs+0s) by Moose::Exporter::build_import_methods at line 70, avg 6µs/call
sub _make_unimport_sub {
7002119µs shift;
701 my $exporting_package = shift;
702 my $exports = shift;
703 my $export_recorder = shift;
704 my $is_reexport = shift;
705 my $meta_lookup = shift;
706
707 return sub {
70834241µs my $caller = scalar caller();
709 Moose::Exporter->_remove_keywords(
710 $caller,
711171.70ms [ keys %{$exports} ],
# spent 1.70ms making 17 calls to Moose::Exporter::_remove_keywords, avg 100µs/call
712 $export_recorder,
713 $is_reexport,
714 );
715 };
716}
717
718
# spent 1.70ms (1.66+46µs) within Moose::Exporter::_remove_keywords which was called 17 times, avg 100µs/call: # 17 times (1.66ms+46µs) by Moose::unimport at line 711, avg 100µs/call
sub _remove_keywords {
719102104µs shift;
720 my $package = shift;
721 my $keywords = shift;
722 my $recorded_exports = shift;
723 my $is_reexport = shift;
724
7252108µs261µs
# spent 39µs (17+22) within Moose::Exporter::BEGIN@725 which was called: # once (17µs+22µs) by Moose::BEGIN@15 at line 725
no strict 'refs';
# spent 39µs making 1 call to Moose::Exporter::BEGIN@725 # spent 22µs making 1 call to strict::unimport
726
727 foreach my $name ( @{$keywords} ) {
72810201.27ms if ( defined &{ $package . '::' . $name } ) {
729 my $sub = \&{ $package . '::' . $name };
730
731 # make sure it is from us
732 next unless $recorded_exports->{$sub};
733
73434201µs if ( $is_reexport->{$name} ) {
7352438µs246µs
# spent 30µs (13+17) within Moose::Exporter::BEGIN@735 which was called: # once (13µs+17µs) by Moose::BEGIN@15 at line 735
no strict 'refs';
# spent 30µs making 1 call to Moose::Exporter::BEGIN@735 # spent 17µs making 1 call to strict::unimport
736 next
737 unless _export_is_flagged(
7383446µs \*{ join q{::} => $package, $name } );
# spent 46µs making 34 calls to Moose::Exporter::_export_is_flagged, avg 1µs/call
739 }
740
741 # and if it is from us, then undef the slot
742 delete ${ $package . '::' }{$name};
743 }
744 }
745}
746
747# maintain this for now for backcompat
748# make sure to return a sub to install in the same circumstances as previously
749# but this functionality now happens at the end of ->import
750
# spent 53µs within Moose::Exporter::_make_init_meta which was called 3 times, avg 18µs/call: # 3 times (53µs+0s) by Moose::Exporter::build_import_methods at line 78, avg 18µs/call
sub _make_init_meta {
7513042µs shift;
752 my $class = shift;
753 my $args = shift;
754 my $meta_lookup = shift;
755
756 my %old_style_roles;
757 for my $role (
758 map {"${_}_roles"}
759 qw(
760 metaclass
761 attribute_metaclass
762 method_metaclass
763 wrapped_method_metaclass
764 instance_metaclass
765 constructor_class
766 destructor_class
767 error_class
768 )
769 ) {
770246µs $old_style_roles{$role} = $args->{$role}
771 if exists $args->{$role};
772 }
773
774 my %base_class_roles;
775 %base_class_roles = ( roles => $args->{base_class_roles} )
776 if exists $args->{base_class_roles};
777
778 my %new_style_roles = map { $_ => $args->{$_} }
779 grep { exists $args->{$_} } qw( class_metaroles role_metaroles );
780
781 return unless %new_style_roles || %old_style_roles || %base_class_roles;
782
783 return sub {
784 shift;
785 my %opts = @_;
786 $meta_lookup->($opts{for_class});
787 };
788}
789
790
# spent 108µs (36+71) within Moose::Exporter::import which was called 3 times, avg 36µs/call: # once (18µs+38µs) by Moose::BEGIN@15 at line 15 of Moose.pm # once (9µs+18µs) by Moose::Role::BEGIN@16 at line 16 of Moose/Role.pm # once (9µs+16µs) by Moose::Util::TypeConstraints::BEGIN@6 at line 6 of Moose/Util/TypeConstraints.pm
sub import {
791629µs346µs strict->import;
# spent 46µs making 3 calls to strict::import, avg 15µs/call
792325µs warnings->import;
# spent 25µs making 3 calls to warnings::import, avg 8µs/call
793}
794
795117µs1;
796
797# ABSTRACT: make an import() and unimport() just like Moose.pm
798
799__END__
 
# spent 24µs within Moose::Exporter::CORE:match which was called 28 times, avg 850ns/call: # 28 times (24µs+0s) by Moose::Exporter::_make_sub_exporter_params at line 287, avg 850ns/call
sub Moose::Exporter::CORE:match; # opcode
# spent 46µs within Moose::Exporter::_export_is_flagged which was called 34 times, avg 1µs/call: # 34 times (46µs+0s) by Moose::Exporter::_remove_keywords at line 738, avg 1µs/call
sub Moose::Exporter::_export_is_flagged; # xsub
# spent 57µs within Moose::Exporter::_flag_as_reexport which was called 40 times, avg 1µs/call: # 40 times (57µs+0s) by Moose::Exporter::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Exporter.pm:140] at line 138, avg 1µs/call
sub Moose::Exporter::_flag_as_reexport; # xsub