← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/hailo
  Run on Thu Oct 21 22:50:37 2010
Reported on Thu Oct 21 22:52:04 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Mouse/Util.pm
StatementsExecuted 1476 statements in 8.42ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
47217.46ms125msMouse::Util::::_try_load_one_classMouse::Util::_try_load_one_class (recurses: max depth 2, inclusive time 12.1ms)
139221.61ms5.82msMouse::Util::::does_roleMouse::Util::does_role
111916µs1.50msMouse::Util::::BEGIN@81Mouse::Util::BEGIN@81
1133693µs97.4msMouse::Util::::apply_all_rolesMouse::Util::apply_all_roles (recurses: max depth 2, inclusive time 19.4ms)
4531613µs613µsMouse::Util::::install_subroutinesMouse::Util::install_subroutines
26011524µs524µsMouse::Util::::get_code_refMouse::Util::get_code_ref (xsub)
4442434µs125msMouse::Util::::load_classMouse::Util::load_class (recurses: max depth 2, inclusive time 12.2ms)
13653386µs386µsMouse::Util::::doesMouse::Util::does
111346µs585µsMouse::Util::::BEGIN@128Mouse::Util::BEGIN@128
2821281µs387µsMouse::Util::::resolve_metaclass_aliasMouse::Util::resolve_metaclass_alias
111215µs1.57msMouse::Util::::BEGIN@20Mouse::Util::BEGIN@20
11821172µs172µsMouse::Util::::is_a_type_constraintMouse::Util::is_a_type_constraint (xsub)
4711154µs154µsMouse::Util::::is_class_loadedMouse::Util::is_class_loaded (xsub)
5144105µs105µsMouse::Util::::is_a_metaroleMouse::Util::is_a_metarole (xsub)
521183µs83µsMouse::Util::::get_code_packageMouse::Util::get_code_package (xsub)
471182µs82µsMouse::Util::::is_valid_class_nameMouse::Util::is_valid_class_name (xsub)
122162µs62µsMouse::Util::::CORE:substMouse::Util::CORE:subst (opcode)
121155µs55µsMouse::Util::::generate_isa_predicate_forMouse::Util::generate_isa_predicate_for (xsub)
171155µs55µsMouse::Util::::is_a_metaclassMouse::Util::is_a_metaclass (xsub)
62245µs132µsMouse::Util::::metaMouse::Util::meta
31142µs87µsMouse::Util::::load_first_existing_classMouse::Util::load_first_existing_class
11129µs42µsMouse::Util::::BEGIN@2Mouse::Util::BEGIN@2
33123µs23µsMouse::Util::::generate_can_predicate_forMouse::Util::generate_can_predicate_for (xsub)
11113µs38µsMouse::Util::::BEGIN@142Mouse::Util::BEGIN@142
11112µs42µsMouse::Util::::BEGIN@13Mouse::Util::BEGIN@13
11112µs58µsMouse::Util::::BEGIN@14Mouse::Util::BEGIN@14
11111µs34µsMouse::Util::::BEGIN@12Mouse::Util::BEGIN@12
4119µs9µsMouse::Util::::get_code_infoMouse::Util::get_code_info (xsub)
1117µs7µsMouse::Util::::BEGIN@80Mouse::Util::BEGIN@80
1114µs4µsMouse::Util::::ENDMouse::Util::END
1112µs2µsMouse::Util::::__register_metaclass_storageMouse::Util::__register_metaclass_storage (xsub)
0000s0sMouse::Util::::__ANON__[:151]Mouse::Util::__ANON__[:151]
0000s0sMouse::Util::::__ANON__[:175]Mouse::Util::__ANON__[:175]
0000s0sMouse::Util::::__ANON__[:77]Mouse::Util::__ANON__[:77]
0000s0sMouse::Util::::dumpMouse::Util::dump
0000s0sMouse::Util::::english_listMouse::Util::english_list
0000s0sMouse::Util::::find_metaMouse::Util::find_meta
0000s0sMouse::Util::::not_supportedMouse::Util::not_supported
0000s0sMouse::Util::::quoted_english_listMouse::Util::quoted_english_list
0000s0sMouse::Util::::throw_errorMouse::Util::throw_error
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Mouse::Util;
2260µs255µs
# spent 42µs (29+13) within Mouse::Util::BEGIN@2 which was called: # once (29µs+13µs) by Mouse::BEGIN@4 at line 2
use Mouse::Exporter; # enables strict and warnings
# spent 42µs making 1 call to Mouse::Util::BEGIN@2 # spent 13µs making 1 call to Mouse::Exporter::import
3
4# must be here because it will be refered by other modules loaded
5sub get_linear_isa($;$); ## no critic
6
7# must be here because it will called in Mouse::Exporter
8
# spent 613µs within Mouse::Util::install_subroutines which was called 45 times, avg 14µs/call: # 28 times (422µs+0s) by Mouse::Exporter::do_import at line 216 of Mouse/Exporter.pm, avg 15µs/call # 12 times (102µs+0s) by Mouse::Exporter::do_import at line 213 of Mouse/Exporter.pm, avg 9µs/call # 5 times (90µs+0s) by Mouse::Exporter::setup_import_methods at line 48 of Mouse/Exporter.pm, avg 18µs/call
sub install_subroutines {
9739µs my $into = shift;
10
11 while(my($name, $code) = splice @_, 0, 2){
12228µs257µs
# spent 34µs (11+23) within Mouse::Util::BEGIN@12 which was called: # once (11µs+23µs) by Mouse::BEGIN@4 at line 12
no strict 'refs';
# spent 34µs making 1 call to Mouse::Util::BEGIN@12 # spent 23µs making 1 call to strict::unimport
13229µs272µs
# spent 42µs (12+30) within Mouse::Util::BEGIN@13 which was called: # once (12µs+30µs) by Mouse::BEGIN@4 at line 13
no warnings 'once', 'redefine';
# spent 42µs making 1 call to Mouse::Util::BEGIN@13 # spent 30µs making 1 call to warnings::unimport
142220µs2104µs
# spent 58µs (12+46) within Mouse::Util::BEGIN@14 which was called: # once (12µs+46µs) by Mouse::BEGIN@4 at line 14
use warnings FATAL => 'uninitialized';
# spent 58µs making 1 call to Mouse::Util::BEGIN@14 # spent 46µs making 1 call to warnings::import
15 *{$into . '::' . $name} = \&{$code};
16 }
17 return;
18}
19
20
# spent 1.57ms (215µs+1.36) within Mouse::Util::BEGIN@20 which was called: # once (215µs+1.36ms) by Mouse::BEGIN@4 at line 78
BEGIN{
21 # This is used in Mouse::PurePerl
229162µs1405µs Mouse::Exporter->setup_import_methods(
# spent 405µs making 1 call to Mouse::Exporter::setup_import_methods
23 as_is => [qw(
24 find_meta
25 does_role
26 resolve_metaclass_alias
27 apply_all_roles
28 english_list
29
30 load_class
31 is_class_loaded
32
33 get_linear_isa
34 get_code_info
35
36 get_code_package
37 get_code_ref
38
39 not_supported
40
41 does meta throw_error dump
42 )],
43 groups => {
44 default => [], # export no functions by default
45
46 # The ':meta' group is 'use metaclass' for Mouse
47 meta => [qw(does meta dump throw_error)],
48 },
49 );
50
51 our $VERSION = '0.80';
52
53 my $xs = !(defined(&is_valid_class_name) || $ENV{MOUSE_PUREPERL} || $ENV{PERL_ONLY});
54
55 # Because Mouse::Util is loaded first in all the Mouse sub-modules,
56 # XSLoader must be placed here, not in Mouse.pm.
57 if($xs){
58 # XXX: XSLoader tries to get the object path from caller's file name
59 # $hack_mouse_file fools its mechanism
60112µs (my $hack_mouse_file = __FILE__) =~ s/.Util//; # .../Mouse/Util.pm -> .../Mouse.pm
# spent 12µs making 1 call to Mouse::Util::CORE:subst
61 $xs = eval sprintf("#line %d %s\n", __LINE__, $hack_mouse_file) . q{
62 local $^W = 0; # workaround 'redefine' warning to &install_subroutines
63 require XSLoader;
64 XSLoader::load('Mouse', $VERSION);
65 Mouse::Util->import({ into => 'Mouse::Meta::Method::Constructor::XS' }, ':meta');
66 Mouse::Util->import({ into => 'Mouse::Meta::Method::Destructor::XS' }, ':meta');
67 Mouse::Util->import({ into => 'Mouse::Meta::Method::Accessor::XS' }, ':meta');
68 return 1;
69 } || 0;
70 warn $@ if $@ && $ENV{MOUSE_XS};
71 }
72
73 if(!$xs){
74 require 'Mouse/PurePerl.pm'; # we don't want to create its namespace
75 }
76
77 *MOUSE_XS = sub(){ $xs };
78130µs11.57ms}
# spent 1.57ms making 1 call to Mouse::Util::BEGIN@20
79
80229µs17µs
# spent 7µs within Mouse::Util::BEGIN@80 which was called: # once (7µs+0s) by Mouse::BEGIN@4 at line 80
use Carp ();
# spent 7µs making 1 call to Mouse::Util::BEGIN@80
812408µs11.50ms
# spent 1.50ms (916µs+580µs) within Mouse::Util::BEGIN@81 which was called: # once (916µs+580µs) by Mouse::BEGIN@4 at line 81
use Scalar::Util ();
# spent 1.50ms making 1 call to Mouse::Util::BEGIN@81
82
83# aliases as public APIs
84# it must be 'require', not 'use', because Mouse::Meta::Module depends on Mouse::Util
851268µsrequire Mouse::Meta::Module; # for the entities of metaclass cache utilities
86
87# aliases
88{
8924µs *class_of = \&Mouse::Meta::Module::_class_of;
9011µs *get_metaclass_by_name = \&Mouse::Meta::Module::_get_metaclass_by_name;
9111µs *get_all_metaclass_instances = \&Mouse::Meta::Module::_get_all_metaclass_instances;
9211µs *get_all_metaclass_names = \&Mouse::Meta::Module::_get_all_metaclass_names;
93
9411µs *Mouse::load_class = \&load_class;
9511µs *Mouse::is_class_loaded = \&is_class_loaded;
96
97 # is-a predicates
98 #generate_isa_predicate_for('Mouse::Meta::TypeConstraint' => 'is_a_type_constraint');
99 #generate_isa_predicate_for('Mouse::Meta::Class' => 'is_a_metaclass');
100 #generate_isa_predicate_for('Mouse::Meta::Role' => 'is_a_metarole');
101
102 # duck type predicates
103123µs116µs generate_can_predicate_for(['_compiled_type_constraint'] => 'is_a_type_constraint');
# spent 16µs making 1 call to Mouse::Util::generate_can_predicate_for
10418µs14µs generate_can_predicate_for(['create_anon_class'] => 'is_a_metaclass');
# spent 4µs making 1 call to Mouse::Util::generate_can_predicate_for
10517µs13µs generate_can_predicate_for(['create_anon_role'] => 'is_a_metarole');
# spent 3µs making 1 call to Mouse::Util::generate_can_predicate_for
106}
107
10811µsour $in_global_destruction = 0;
10915µs
# spent 4µs within Mouse::Util::END which was called: # once (4µs+0s) by main::RUNTIME at line 0 of bin/hailo
END{ $in_global_destruction = 1 }
110
111# Moose::Util compatible utilities
112
113sub find_meta{
114 return class_of( $_[0] );
115}
116
117
# spent 5.82ms (1.61+4.21) within Mouse::Util::does_role which was called 139 times, avg 42µs/call: # 136 times (1.56ms+3.95ms) by Mouse::Meta::Attribute::interpolate_class or MouseX::Getopt::Basic::_compute_getopt_attrs or MouseX::Getopt::Basic::_get_cmd_flags_for_attr or MouseX::Getopt::Dashes::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/MouseX/Getopt/Dashes.pm:24] at line 379, avg 40µs/call # 3 times (51µs+258µs) by Mouse::Util::TypeConstraints::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Mouse/Util/TypeConstraints.pm:217] at line 215 of Mouse/Util/TypeConstraints.pm, avg 103µs/call
sub does_role{
1185561.54ms my ($class_or_obj, $role_name) = @_;
119
120139740µs my $meta = class_of($class_or_obj);
# spent 740µs making 139 calls to Mouse::Meta::Module::_class_of, avg 5µs/call
121
122 (defined $role_name)
123 || ($meta || 'Mouse::Meta::Class')->throw_error("You must supply a role name to does()");
124
125813.47ms return defined($meta) && $meta->does_role($role_name);
# spent 3.47ms making 81 calls to Mouse::Meta::Class::does_role, avg 43µs/call
126}
127
128
# spent 585µs (346+239) within Mouse::Util::BEGIN@128 which was called: # once (346µs+239µs) by Mouse::BEGIN@4 at line 179
BEGIN {
1295165µs my $get_linear_isa;
130 if ($] >= 5.009_005) {
131 require mro;
132 $get_linear_isa = \&mro::get_linear_isa;
133 } else {
134 # this code is based on MRO::Compat::__get_linear_isa
135 my $_get_linear_isa_dfs; # this recurses so it isn't pretty
136 $_get_linear_isa_dfs = sub {
137 my($classname) = @_;
138
139 my @lin = ($classname);
140 my %stored;
141
1422184µs263µs
# spent 38µs (13+25) within Mouse::Util::BEGIN@142 which was called: # once (13µs+25µs) by Mouse::BEGIN@4 at line 142
no strict 'refs';
# spent 38µs making 1 call to Mouse::Util::BEGIN@142 # spent 25µs making 1 call to strict::unimport
143 foreach my $parent (@{"$classname\::ISA"}) {
144 foreach my $p(@{ $_get_linear_isa_dfs->($parent) }) {
145 next if exists $stored{$p};
146 push(@lin, $p);
147 $stored{$p} = 1;
148 }
149 }
150 return \@lin;
151 };
152
153 {
154 package # hide from PAUSE
155 Class::C3;
156 our %MRO; # avoid 'once' warnings
157 }
158
159 # MRO::Compat::__get_linear_isa has no prototype, so
160 # we define a prototyped version for compatibility with core's
161 # See also MRO::Compat::__get_linear_isa.
162 $get_linear_isa = sub ($;$){
163 my($classname, $type) = @_;
164
165 if(!defined $type){
166 $type = exists $Class::C3::MRO{$classname} ? 'c3' : 'dfs';
167 }
168 if($type eq 'c3'){
169 require Class::C3;
170 return [Class::C3::calculateMRO($classname)];
171 }
172 else{
173 return $_get_linear_isa_dfs->($classname);
174 }
175 };
176 }
177
178 *get_linear_isa = $get_linear_isa;
1791878µs1585µs}
# spent 585µs making 1 call to Mouse::Util::BEGIN@128
180
181
182# taken from Mouse::Util (0.90)
183{
18423µs my %cache;
185
186
# spent 387µs (281+106) within Mouse::Util::resolve_metaclass_alias which was called 28 times, avg 14µs/call: # 26 times (245µs+73µs) by Mouse::Meta::Attribute::interpolate_class at line 118 of Mouse/Meta/Attribute.pm, avg 12µs/call # 2 times (36µs+34µs) by Mouse::Meta::Attribute::interpolate_class at line 110 of Mouse/Meta/Attribute.pm, avg 35µs/call
sub resolve_metaclass_alias {
18793307µs my ( $type, $metaclass_name, %options ) = @_;
188
189 my $cache_key = $type . q{ } . ( $options{trait} ? '-Trait' : '' );
190
191 return $cache{$cache_key}{$metaclass_name} ||= do{
192
193 my $possible_full_name = join '::',
194 'Mouse::Meta', $type, 'Custom', ($options{trait} ? 'Trait' : ()), $metaclass_name
195 ;
196
197387µs my $loaded_class = load_first_existing_class(
# spent 87µs making 3 calls to Mouse::Util::load_first_existing_class, avg 29µs/call
198 $possible_full_name,
199 $metaclass_name
200 );
201
202619µs $loaded_class->can('register_implementation')
203 ? $loaded_class->register_implementation
204 : $loaded_class;
205 };
206 }
207}
208
209# Utilities from Class::MOP
210
211sub get_code_info;
212sub get_code_package;
213
214sub is_valid_class_name;
215
216# taken from Class/MOP.pm
217
# spent 87µs (42+46) within Mouse::Util::load_first_existing_class which was called 3 times, avg 29µs/call: # 3 times (42µs+46µs) by Mouse::Util::resolve_metaclass_alias at line 197, avg 29µs/call
sub load_first_existing_class {
2181842µs my @classes = @_
219 or return;
220
221 my %exceptions;
222 for my $class (@classes) {
223346µs my $e = _try_load_one_class($class);
# spent 46µs making 3 calls to Mouse::Util::_try_load_one_class, avg 15µs/call
224
225 if ($e) {
226 $exceptions{$class} = $e;
227 }
228 else {
229 return $class;
230 }
231 }
232
233 # not found
234 Carp::confess join(
235 "\n",
236 map {
237 sprintf( "Could not load class (%s) because : %s",
238 $_, $exceptions{$_} )
239 } @classes
240 );
241}
242
243# taken from Class/MOP.pm
244
# spent 125ms (7.46+118) within Mouse::Util::_try_load_one_class which was called 47 times, avg 2.66ms/call: # 44 times (7.43ms+118ms) by Mouse::Util::load_class at line 267, avg 2.84ms/call # 3 times (30µs+15µs) by Mouse::Util::load_first_existing_class at line 223, avg 15µs/call
sub _try_load_one_class {
2452182.02ms my $class = shift;
246
2474782µs unless ( is_valid_class_name($class) ) {
# spent 82µs making 47 calls to Mouse::Util::is_valid_class_name, avg 2µs/call
248 my $display = defined($class) ? $class : 'undef';
249 Carp::confess "Invalid class name ($display)";
250 }
251
25247154µs return '' if is_class_loaded($class);
# spent 154µs making 47 calls to Mouse::Util::is_class_loaded, avg 3µs/call
253
2541150µs $class =~ s{::}{/}g;
# spent 50µs making 11 calls to Mouse::Util::CORE:subst, avg 5µs/call
255 $class .= '.pm';
256
257 return do {
258 local $@;
259 eval { require $class };
260 $@;
261 };
262}
263
264
265
# spent 125ms (434µs+125) within Mouse::Util::load_class which was called 44 times, avg 2.85ms/call: # 16 times (159µs+46.6ms) by Mouse::Meta::Class::superclasses at line 58 of Mouse/Meta/Class.pm, avg 2.92ms/call # 14 times (141µs+78.1ms) by Mouse::Util::apply_all_roles at line 292, avg 5.59ms/call # 7 times (74µs+56µs) by Mouse::Meta::Class::make_immutable at line 290 of Mouse/Meta/Class.pm, avg 19µs/call # 7 times (61µs+48µs) by Mouse::Meta::Class::make_immutable at line 296 of Mouse/Meta/Class.pm, avg 16µs/call
sub load_class {
266176427µs my $class = shift;
26744125ms my $e = _try_load_one_class($class);
# spent 137ms making 44 calls to Mouse::Util::_try_load_one_class, avg 3.11ms/call, recursion: max depth 2, sum of overlapping time 12.1ms
268 Carp::confess "Could not load class ($class) because : $e" if $e;
269
270 return $class;
271}
272
273sub is_class_loaded;
274
275
# spent 97.4ms (693µs+96.7) within Mouse::Util::apply_all_roles which was called 11 times, avg 8.85ms/call: # 6 times (430µs+47.2ms) by Mouse::with at line 40 of Mouse.pm, avg 7.94ms/call # 3 times (167µs+49.5ms) by Mouse::Role::with at line 32 of Mouse/Role.pm, avg 16.6ms/call # 2 times (95µs+-95µs) by Mouse::Meta::Module::create at line 265 of Mouse/Meta/Module.pm, avg 0s/call
sub apply_all_roles {
276222715µs2289µs my $consumer = Scalar::Util::blessed($_[0])
# spent 72µs making 11 calls to Mouse::Meta::Module::initialize, avg 7µs/call # spent 17µs making 11 calls to Scalar::Util::blessed, avg 2µs/call
277 ? $_[0] # instance
278 : Mouse::Meta::Class->initialize($_[0]); # class or role name
279
280 my @roles;
281
282 # Basis of Data::OptList
283 my $max = scalar(@_);
284 for (my $i = 1; $i < $max ; $i++) {
285 my $role = $_[$i];
286 my $role_name;
287 if(ref $role) {
288 $role_name = $role->name;
289 }
290 else {
291 $role_name = $role;
2921478.2ms load_class($role_name);
# spent 90.2ms making 14 calls to Mouse::Util::load_class, avg 6.44ms/call, recursion: max depth 2, sum of overlapping time 11.9ms
2931448µs $role = get_metaclass_by_name($role_name);
# spent 48µs making 14 calls to Mouse::Meta::Module::_get_metaclass_by_name, avg 3µs/call
294 }
295
296 if ($i + 1 < $max && ref($_[$i + 1]) eq 'HASH') {
297 push @roles, [ $role => $_[++$i] ];
298 } else {
299 push @roles, [ $role => undef ];
300 }
3011440µs is_a_metarole($role)
# spent 40µs making 14 calls to Mouse::Util::is_a_metarole, avg 3µs/call
302 || $consumer->meta->throw_error("You can only consume roles, $role_name is not a Mouse role");
303 }
304
305 if ( scalar @roles == 1 ) {
306 my ( $role, $params ) = @{ $roles[0] };
307812.6ms $role->apply( $consumer, defined $params ? $params : () );
# spent 14.0ms making 8 calls to Mouse::Meta::Role::apply, avg 1.75ms/call, recursion: max depth 1, sum of overlapping time 1.36ms
308 }
309 else {
310611.7ms Mouse::Meta::Role->combine(@roles)->apply($consumer);
# spent 6.20ms making 3 calls to Mouse::Meta::Role::combine, avg 2.07ms/call # spent 5.53ms making 3 calls to Mouse::Meta::Role::Composite::apply, avg 1.84ms/call
311 }
312 return;
313}
314
315# taken from Moose::Util 0.90
316sub english_list {
317 return $_[0] if @_ == 1;
318
319 my @items = sort @_;
320
321 return "$items[0] and $items[1]" if @items == 2;
322
323 my $tail = pop @items;
324
325 return join q{, }, @items, "and $tail";
326}
327
328sub quoted_english_list {
329 return english_list(map { qq{'$_'} } @_);
330}
331
332# common utilities
333
334sub not_supported{
335 my($feature) = @_;
336
337 $feature ||= ( caller(1) )[3] . '()'; # subroutine name
338
339 local $Carp::CarpLevel = $Carp::CarpLevel + 1;
340 Carp::confess("Mouse does not currently support $feature");
341}
342
343# general meta() method
344
# spent 132µs (45+86) within Mouse::Util::meta which was called 6 times, avg 22µs/call: # 3 times (26µs+47µs) by Mouse::Meta::Role::_construct_meta at line 20 of Mouse/Meta/Role.pm, avg 24µs/call # 3 times (19µs+39µs) by Mouse::Meta::Role::Application::new at line 36 of Mouse/Meta/Role/Application.pm, avg 19µs/call
sub meta :method{
345648µs639µs return Mouse::Meta::Class->initialize(ref($_[0]) || $_[0]);
# spent 86µs making 6 calls to Mouse::Meta::Module::initialize, avg 14µs/call, recursion: max depth 1, sum of overlapping time 47µs
346}
347
348# general throw_error() method
349# $o->throw_error($msg, depth => $leve, longmess => $croak_or_confess)
350sub throw_error :method {
351 my($self, $message, %args) = @_;
352
353 local $Carp::CarpLevel = $Carp::CarpLevel + 1 + ($args{depth} || 0);
354 local $Carp::MaxArgNums = 20; # default is 8, usually we use named args which gets messier though
355
356 if(exists $args{longmess} && !$args{longmess}) {
357 Carp::croak($message);
358 }
359 else{
360 Carp::confess($message);
361 }
362}
363
364# general dump() method
365sub dump :method {
366 my($self, $maxdepth) = @_;
367
368 require 'Data/Dumper.pm'; # we don't want to create its namespace
369 my $dd = Data::Dumper->new([$self]);
370 $dd->Maxdepth(defined($maxdepth) ? $maxdepth : 3);
371 $dd->Indent(1);
372 $dd->Sortkeys(1);
373 $dd->Quotekeys(0);
374 return $dd->Dump();
375}
376
377# general does() method
378
# spent 386µs within Mouse::Util::does which was called 136 times, avg 3µs/call: # 38 times (104µs+0s) by MouseX::Getopt::Basic::_compute_getopt_attrs at line 170 of MouseX/Getopt/Basic.pm, avg 3µs/call # 28 times (77µs+0s) by MouseX::Getopt::Basic::_compute_getopt_attrs at line 168 of MouseX/Getopt/Basic.pm, avg 3µs/call # 26 times (80µs+0s) by Mouse::Meta::Attribute::interpolate_class at line 120 of Mouse/Meta/Attribute.pm, avg 3µs/call # 22 times (63µs+0s) by MouseX::Getopt::Dashes::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/MouseX/Getopt/Dashes.pm:24] at line 19 of MouseX/Getopt/Dashes.pm, avg 3µs/call # 22 times (63µs+0s) by MouseX::Getopt::Basic::_get_cmd_flags_for_attr at line 185 of MouseX/Getopt/Basic.pm, avg 3µs/call
sub does :method {
379136754µs1365.51ms goto &does_role;
# spent 5.51ms making 136 calls to Mouse::Util::does_role, avg 40µs/call
380}
381
382110µs1;
383__END__
 
# spent 62µs within Mouse::Util::CORE:subst which was called 12 times, avg 5µs/call: # 11 times (50µs+0s) by Mouse::Util::_try_load_one_class at line 254, avg 5µs/call # once (12µs+0s) by Mouse::Util::BEGIN@20 at line 60
sub Mouse::Util::CORE:subst; # opcode
# spent 2µs within Mouse::Util::__register_metaclass_storage which was called: # once (2µs+0s) by Mouse::BEGIN@4 at line 11 of Mouse/Meta/Module.pm
sub Mouse::Util::__register_metaclass_storage; # xsub
# spent 23µs within Mouse::Util::generate_can_predicate_for which was called 3 times, avg 8µs/call: # once (16µs+0s) by Mouse::BEGIN@4 at line 103 # once (4µs+0s) by Mouse::BEGIN@4 at line 104 # once (3µs+0s) by Mouse::BEGIN@4 at line 105
sub Mouse::Util::generate_can_predicate_for; # xsub
# spent 55µs within Mouse::Util::generate_isa_predicate_for which was called 12 times, avg 5µs/call: # 12 times (55µs+0s) by Mouse::Util::TypeConstraints::class_type at line 200 of Mouse/Util/TypeConstraints.pm, avg 5µs/call
sub Mouse::Util::generate_isa_predicate_for; # xsub
# spent 9µs within Mouse::Util::get_code_info which was called 4 times, avg 2µs/call: # 4 times (9µs+0s) by Mouse::Exporter::build_import_methods at line 91 of Mouse/Exporter.pm, avg 2µs/call
sub Mouse::Util::get_code_info; # xsub
# spent 83µs within Mouse::Util::get_code_package which was called 52 times, avg 2µs/call: # 52 times (83µs+0s) by Mouse::Meta::Module::_get_method_body at line 90 of Mouse/Meta/Module.pm, avg 2µs/call
sub Mouse::Util::get_code_package; # xsub
# spent 524µs within Mouse::Util::get_code_ref which was called 260 times, avg 2µs/call: # 260 times (524µs+0s) by Mouse::Meta::Module::_get_method_body at line 89 of Mouse/Meta/Module.pm, avg 2µs/call
sub Mouse::Util::get_code_ref; # xsub
# spent 55µs within Mouse::Util::is_a_metaclass which was called 17 times, avg 3µs/call: # 17 times (55µs+0s) by Mouse::Meta::Role::Application::apply at line 46 of Mouse/Meta/Role/Application.pm, avg 3µs/call
sub Mouse::Util::is_a_metaclass; # xsub
# spent 105µs within Mouse::Util::is_a_metarole which was called 51 times, avg 2µs/call: # 26 times (39µs+0s) by Mouse::Meta::Module::create at line 178 of Mouse/Meta/Module.pm, avg 1µs/call # 14 times (40µs+0s) by Mouse::Util::apply_all_roles at line 301, avg 3µs/call # 9 times (13µs+0s) by Mouse::Meta::Role::Application::apply at line 46 of Mouse/Meta/Role/Application.pm, avg 1µs/call # 2 times (13µs+0s) by Mouse::Meta::Class::verify_superclass at line 72 of Mouse/Meta/Class.pm, avg 6µs/call
sub Mouse::Util::is_a_metarole; # xsub
# spent 172µs within Mouse::Util::is_a_type_constraint which was called 118 times, avg 1µs/call: # 92 times (131µs+0s) by Mouse::Util::TypeConstraints::find_or_parse_type_constraint at line 394 of Mouse/Util/TypeConstraints.pm, avg 1µs/call # 26 times (42µs+0s) by Mouse::Util::TypeConstraints::find_type_constraint at line 376 of Mouse/Util/TypeConstraints.pm, avg 2µs/call
sub Mouse::Util::is_a_type_constraint; # xsub
# spent 154µs within Mouse::Util::is_class_loaded which was called 47 times, avg 3µs/call: # 47 times (154µs+0s) by Mouse::Util::_try_load_one_class at line 252, avg 3µs/call
sub Mouse::Util::is_class_loaded; # xsub
# spent 82µs within Mouse::Util::is_valid_class_name which was called 47 times, avg 2µs/call: # 47 times (82µs+0s) by Mouse::Util::_try_load_one_class at line 247, avg 2µs/call
sub Mouse::Util::is_valid_class_name; # xsub