← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mongo_pain.pl
  Run on Fri Mar 25 17:00:29 2011
Reported on Fri Mar 25 17:07:06 2011

Filename/usr/local/lib/perl/5.10.1/Mouse/Util/TypeConstraints.pm
StatementsExecuted 646 statements in 4.50ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
5111356µs515µsMouse::Util::TypeConstraints::::find_or_parse_type_constraintMouse::Util::TypeConstraints::find_or_parse_type_constraint
811249µs670µsMouse::Util::TypeConstraints::::_define_typeMouse::Util::TypeConstraints::_define_type
5122243µs1.01msMouse::Util::TypeConstraints::::find_or_create_isa_type_constraintMouse::Util::TypeConstraints::find_or_create_isa_type_constraint (recurses: max depth 1, inclusive time 31µs)
81176µs96µsMouse::Util::TypeConstraints::::find_type_constraintMouse::Util::TypeConstraints::find_type_constraint
82275µs832µsMouse::Util::TypeConstraints::::class_typeMouse::Util::TypeConstraints::class_type
81143µs713µsMouse::Util::TypeConstraints::::subtypeMouse::Util::TypeConstraints::subtype
21122µs27µsMouse::Util::TypeConstraints::::_find_or_create_regular_typeMouse::Util::TypeConstraints::_find_or_create_regular_type
123121µs21µsMouse::Util::TypeConstraints::::CORE:substMouse::Util::TypeConstraints::CORE:subst (opcode)
21121µs57µsMouse::Util::TypeConstraints::::_parse_nameMouse::Util::TypeConstraints::_parse_name
21120µs92µsMouse::Util::TypeConstraints::::_parse_single_typeMouse::Util::TypeConstraints::_parse_single_type
81119µs19µsMouse::Util::TypeConstraints::::CORE:matchMouse::Util::TypeConstraints::CORE:match (opcode)
11115µs42µsMouse::Util::TypeConstraints::::BEGIN@2Mouse::Util::TypeConstraints::BEGIN@2
21115µs106µsMouse::Util::TypeConstraints::::_parse_typeMouse::Util::TypeConstraints::_parse_type
21113µs14µsMouse::Util::TypeConstraints::::_parse_paramMouse::Util::TypeConstraints::_parse_param
11110µs14µsMouse::Util::TypeConstraints::::BEGIN@5Mouse::Util::TypeConstraints::BEGIN@5
1116µs6µsMouse::Util::TypeConstraints::::BEGIN@4Mouse::Util::TypeConstraints::BEGIN@4
1115µs5µsMouse::Util::TypeConstraints::::BEGIN@7Mouse::Util::TypeConstraints::BEGIN@7
1115µs5µsMouse::Util::TypeConstraints::::BEGIN@8Mouse::Util::TypeConstraints::BEGIN@8
0000s0sMouse::Util::TypeConstraints::::__ANON__[:217]Mouse::Util::TypeConstraints::__ANON__[:217]
0000s0sMouse::Util::TypeConstraints::::__ANON__[:241]Mouse::Util::TypeConstraints::__ANON__[:241]
0000s0sMouse::Util::TypeConstraints::::__ANON__[:261]Mouse::Util::TypeConstraints::__ANON__[:261]
0000s0sMouse::Util::TypeConstraints::::_find_or_create_parameterized_typeMouse::Util::TypeConstraints::_find_or_create_parameterized_type
0000s0sMouse::Util::TypeConstraints::::_find_or_create_union_typeMouse::Util::TypeConstraints::_find_or_create_union_type
0000s0sMouse::Util::TypeConstraints::::asMouse::Util::TypeConstraints::as
0000s0sMouse::Util::TypeConstraints::::coerceMouse::Util::TypeConstraints::coerce
0000s0sMouse::Util::TypeConstraints::::duck_typeMouse::Util::TypeConstraints::duck_type
0000s0sMouse::Util::TypeConstraints::::enumMouse::Util::TypeConstraints::enum
0000s0sMouse::Util::TypeConstraints::::find_or_create_does_type_constraintMouse::Util::TypeConstraints::find_or_create_does_type_constraint
0000s0sMouse::Util::TypeConstraints::::fromMouse::Util::TypeConstraints::from
0000s0sMouse::Util::TypeConstraints::::list_all_builtin_type_constraintsMouse::Util::TypeConstraints::list_all_builtin_type_constraints
0000s0sMouse::Util::TypeConstraints::::list_all_type_constraintsMouse::Util::TypeConstraints::list_all_type_constraints
0000s0sMouse::Util::TypeConstraints::::messageMouse::Util::TypeConstraints::message
0000s0sMouse::Util::TypeConstraints::::optimize_asMouse::Util::TypeConstraints::optimize_as
0000s0sMouse::Util::TypeConstraints::::optimized_constraintsMouse::Util::TypeConstraints::optimized_constraints
0000s0sMouse::Util::TypeConstraints::::register_type_constraintMouse::Util::TypeConstraints::register_type_constraint
0000s0sMouse::Util::TypeConstraints::::role_typeMouse::Util::TypeConstraints::role_type
0000s0sMouse::Util::TypeConstraints::::typeMouse::Util::TypeConstraints::type
0000s0sMouse::Util::TypeConstraints::::viaMouse::Util::TypeConstraints::via
0000s0sMouse::Util::TypeConstraints::::whereMouse::Util::TypeConstraints::where
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::TypeConstraints;
2335µs270µs
# spent 42µs (15+27) within Mouse::Util::TypeConstraints::BEGIN@2 which was called: # once (15µs+27µs) by Mouse::BEGIN@18 at line 2
use Mouse::Util; # enables strict and warnings
# spent 42µs making 1 call to Mouse::Util::TypeConstraints::BEGIN@2 # spent 27µs making 1 call to Mouse::Exporter::do_import
3
4332µs16µs
# spent 6µs within Mouse::Util::TypeConstraints::BEGIN@4 which was called: # once (6µs+0s) by Mouse::BEGIN@18 at line 4
use Mouse::Meta::TypeConstraint;
# spent 6µs making 1 call to Mouse::Util::TypeConstraints::BEGIN@4
5331µs219µs
# spent 14µs (10+5) within Mouse::Util::TypeConstraints::BEGIN@5 which was called: # once (10µs+5µs) by Mouse::BEGIN@18 at line 5
use Mouse::Exporter;
# spent 14µs making 1 call to Mouse::Util::TypeConstraints::BEGIN@5 # spent 5µs making 1 call to Mouse::Exporter::import
6
7328µs15µs
# spent 5µs within Mouse::Util::TypeConstraints::BEGIN@7 which was called: # once (5µs+0s) by Mouse::BEGIN@18 at line 7
use Carp ();
# spent 5µs making 1 call to Mouse::Util::TypeConstraints::BEGIN@7
832.90ms15µs
# spent 5µs within Mouse::Util::TypeConstraints::BEGIN@8 which was called: # once (5µs+0s) by Mouse::BEGIN@18 at line 8
use Scalar::Util ();
# spent 5µs making 1 call to Mouse::Util::TypeConstraints::BEGIN@8
9
1017µs1161µsMouse::Exporter->setup_import_methods(
# spent 161µs making 1 call to Mouse::Exporter::setup_import_methods
11 as_is => [qw(
12 as where message optimize_as
13 from via
14
15 type subtype class_type role_type duck_type
16 enum
17 coerce
18
19 find_type_constraint
20 register_type_constraint
21 )],
22);
23
2411µsour @CARP_NOT = qw(Mouse::Meta::Attribute);
25
261300nsmy %TYPE;
27
28# The root type
2913µs164µs$TYPE{Any} = Mouse::Meta::TypeConstraint->new(
# spent 64µs making 1 call to Mouse::Meta::TypeConstraint::new
30 name => 'Any',
31);
32
33113µsmy @builtins = (
34 # $name => $parent, $code,
35
36 # the base type
37 Item => 'Any', undef,
38
39 # the maybe[] type
40 Maybe => 'Item', undef,
41
42 # value types
43 Undef => 'Item', \&Undef,
44 Defined => 'Item', \&Defined,
45 Bool => 'Item', \&Bool,
46 Value => 'Defined', \&Value,
47 Str => 'Value', \&Str,
48 Num => 'Str', \&Num,
49 Int => 'Num', \&Int,
50
51 # ref types
52 Ref => 'Defined', \&Ref,
53 ScalarRef => 'Ref', \&ScalarRef,
54 ArrayRef => 'Ref', \&ArrayRef,
55 HashRef => 'Ref', \&HashRef,
56 CodeRef => 'Ref', \&CodeRef,
57 RegexpRef => 'Ref', \&RegexpRef,
58 GlobRef => 'Ref', \&GlobRef,
59
60 # object types
61 FileHandle => 'GlobRef', \&FileHandle,
62 Object => 'Ref', \&Object,
63
64 # special string types
65 ClassName => 'Str', \&ClassName,
66 RoleName => 'ClassName', \&RoleName,
67);
68
69188µs20394µswhile (my ($name, $parent, $code) = splice @builtins, 0, 3) {
# spent 394µs making 20 calls to Mouse::Meta::TypeConstraint::new, avg 20µs/call
70 $TYPE{$name} = Mouse::Meta::TypeConstraint->new(
71 name => $name,
72 parent => $TYPE{$parent},
73 optimized => $code,
74 );
75}
76
77# parametarizable types
7812µs$TYPE{Maybe} {constraint_generator} = \&_parameterize_Maybe_for;
7911µs$TYPE{ArrayRef}{constraint_generator} = \&_parameterize_ArrayRef_for;
801900ns$TYPE{HashRef} {constraint_generator} = \&_parameterize_HashRef_for;
81
82# sugars
83sub as ($) { (as => $_[0]) } ## no critic
84sub where (&) { (where => $_[0]) } ## no critic
85sub message (&) { (message => $_[0]) } ## no critic
86sub optimize_as (&) { (optimize_as => $_[0]) } ## no critic
87
88sub from { @_ }
89sub via (&) { $_[0] } ## no critic
90
91# type utilities
92
93sub optimized_constraints { # DEPRECATED
94 Carp::cluck('optimized_constraints() has been deprecated');
95 return \%TYPE;
96}
97
981800nsundef @builtins; # free the allocated memory
9918µs@builtins = keys %TYPE; # reuse it
100sub list_all_builtin_type_constraints { @builtins }
101sub list_all_type_constraints { keys %TYPE }
102
103
# spent 670µs (249+421) within Mouse::Util::TypeConstraints::_define_type which was called 8 times, avg 84µs/call: # 8 times (249µs+421µs) by Mouse::Util::TypeConstraints::subtype at line 183, avg 84µs/call
sub _define_type {
104152267µs my $is_subtype = shift;
105 my $name;
106 my %args;
107
108 if(@_ == 1 && ref $_[0] ){ # @_ : { name => $name, where => ... }
109 %args = %{$_[0]};
110 }
111 elsif(@_ == 2 && ref $_[1]) { # @_ : $name => { where => ... }
112 $name = $_[0];
113 %args = %{$_[1]};
114 }
115 elsif(@_ % 2) { # @_ : $name => ( where => ... )
116 ($name, %args) = @_;
117 }
118 else{ # @_ : (name => $name, where => ...)
119 %args = @_;
120 }
121
122 if(!defined $name){
123 $name = $args{name};
124 }
125
126 $args{name} = $name;
127
128 my $parent = delete $args{as};
129 if($is_subtype && !$parent){
130 $parent = delete $args{name};
131 $name = undef;
132 }
133
134878µs if(defined $parent) {
# spent 109µs making 8 calls to Mouse::Util::TypeConstraints::find_or_create_isa_type_constraint, avg 14µs/call, recursion: max depth 1, sum of overlapping time 31µs
135 $args{parent} = find_or_create_isa_type_constraint($parent);
136 }
137
138 if(defined $name){
139 # set 'package_defined_in' only if it is not a core package
140 my $this = $args{package_defined_in};
141 if(!$this){
142 $this = caller(1);
143819µs if($this !~ /\A Mouse \b/xms){
# spent 19µs making 8 calls to Mouse::Util::TypeConstraints::CORE:match, avg 2µs/call
144 $args{package_defined_in} = $this;
145 }
146 }
147
148 if(defined $TYPE{$name}){
149 my $that = $TYPE{$name}->{package_defined_in} || __PACKAGE__;
150 if($this ne $that) {
151 my $note = '';
152 if($that eq __PACKAGE__) {
153 $note = sprintf " ('%s' is %s type constraint)",
154 $name,
155 scalar(grep { $name eq $_ } list_all_builtin_type_constraints())
156 ? 'a builtin'
157 : 'an implicitly created';
158 }
159 Carp::croak("The type constraint '$name' has already been created in $that"
160 . " and cannot be created again in $this" . $note);
161 }
162 }
163 }
164
165 $args{constraint} = delete $args{where} if exists $args{where};
166 $args{optimized} = delete $args{optimized_as} if exists $args{optimized_as};
167
1688293µs my $constraint = Mouse::Meta::TypeConstraint->new(%args);
# spent 293µs making 8 calls to Mouse::Meta::TypeConstraint::new, avg 37µs/call
169
170 if(defined $name){
171 return $TYPE{$name} = $constraint;
172 }
173 else{
174 return $constraint;
175 }
176}
177
178sub type {
179 return _define_type 0, @_;
180}
181
182
# spent 713µs (43+670) within Mouse::Util::TypeConstraints::subtype which was called 8 times, avg 89µs/call: # 8 times (43µs+670µs) by Mouse::Util::TypeConstraints::class_type at line 200, avg 89µs/call
sub subtype {
183829µs8670µs return _define_type 1, @_;
# spent 670µs making 8 calls to Mouse::Util::TypeConstraints::_define_type, avg 84µs/call
184}
185
186sub coerce { # coerce $type, from $from, via { ... }, ...
187 my $type_name = shift;
188 my $type = find_type_constraint($type_name)
189 or Carp::croak("Cannot find type '$type_name', perhaps you forgot to load it");
190
191 $type->_add_type_coercions(@_);
192 return;
193}
194
195
# spent 832µs (75+757) within Mouse::Util::TypeConstraints::class_type which was called 8 times, avg 104µs/call: # 6 times (53µs+497µs) by Mouse::init_meta at line 143 of Mouse.pm, avg 92µs/call # 2 times (21µs+260µs) by Mouse::Util::TypeConstraints::find_or_create_isa_type_constraint at line 423, avg 141µs/call
sub class_type {
19624121µs my($name, $options) = @_;
197 my $class = $options->{class} || $name;
198
199 # ClassType
20016757µs return subtype $name => (
# spent 713µs making 8 calls to Mouse::Util::TypeConstraints::subtype, avg 89µs/call # spent 44µs making 8 calls to Mouse::Util::generate_isa_predicate_for, avg 6µs/call
201 as => 'Object',
202 optimized_as => Mouse::Util::generate_isa_predicate_for($class),
203 class => $class,
204 );
205}
206
207sub role_type {
208 my($name, $options) = @_;
209 my $role = $options->{role} || $name;
210
211 # RoleType
212 return subtype $name => (
213 as => 'Object',
214 optimized_as => sub {
215 return Scalar::Util::blessed($_[0])
216 && Mouse::Util::does_role($_[0], $role);
217 },
218 role => $role,
219 );
220}
221
222sub duck_type {
223 my($name, @methods);
224
225 if(ref($_[0]) ne 'ARRAY'){
226 $name = shift;
227 }
228
229 @methods = (@_ == 1 && ref($_[0]) eq 'ARRAY') ? @{$_[0]} : @_;
230
231 # DuckType
232 return _define_type 1, $name => (
233 as => 'Object',
234 optimized_as => Mouse::Util::generate_can_predicate_for(\@methods),
235 message => sub {
236 my($object) = @_;
237 my @missing = grep { !$object->can($_) } @methods;
238 return ref($object)
239 . ' is missing methods '
240 . Mouse::Util::quoted_english_list(@missing);
241 },
242 methods => \@methods,
243 );
244}
245
246sub enum {
247 my($name, %valid);
248
249 if(!(@_ == 1 && ref($_[0]) eq 'ARRAY')){
250 $name = shift;
251 }
252
253 %valid = map{ $_ => undef }
254 (@_ == 1 && ref($_[0]) eq 'ARRAY' ? @{$_[0]} : @_);
255
256 # EnumType
257 return _define_type 1, $name => (
258 as => 'Str',
259 optimized_as => sub{
260 return defined($_[0]) && !ref($_[0]) && exists $valid{$_[0]};
261 },
262 );
263}
264
265
# spent 27µs (22+5) within Mouse::Util::TypeConstraints::_find_or_create_regular_type which was called 2 times, avg 14µs/call: # 2 times (22µs+5µs) by Mouse::Util::TypeConstraints::_parse_name at line 329, avg 14µs/call
sub _find_or_create_regular_type{
266820µs my($spec, $create) = @_;
267
268 return $TYPE{$spec} if exists $TYPE{$spec};
269
27025µs my $meta = Mouse::Util::get_metaclass_by_name($spec);
# spent 5µs making 2 calls to Mouse::Meta::Module::_get_metaclass_by_name, avg 2µs/call
271
272 if(!defined $meta){
273 return $create ? class_type($spec) : undef;
274 }
275
276 if(Mouse::Util::is_a_metarole($meta)){
277 return role_type($spec);
278 }
279 else{
280 return class_type($spec);
281 }
282}
283
284sub _find_or_create_parameterized_type{
285 my($base, $param) = @_;
286
287 my $name = sprintf '%s[%s]', $base->name, $param->name;
288
289 $TYPE{$name} ||= $base->parameterize($param, $name);
290}
291
292sub _find_or_create_union_type{
293 return if grep{ not defined } @_; # all things must be defined
294 my @types = sort
295 map{ $_->{type_constraints} ? @{$_->{type_constraints}} : $_ } @_;
296
297 my $name = join '|', @types;
298
299 # UnionType
300 $TYPE{$name} ||= Mouse::Meta::TypeConstraint->new(
301 name => $name,
302 type_constraints => \@types,
303 );
304}
305
306# The type parser
307
308# param : '[' type ']' | NOTHING
309
# spent 14µs (13+800ns) within Mouse::Util::TypeConstraints::_parse_param which was called 2 times, avg 7µs/call: # 2 times (13µs+800ns) by Mouse::Util::TypeConstraints::_parse_single_type at line 339, avg 7µs/call
sub _parse_param {
310616µs my($c) = @_;
311
3122800ns if($c->{spec} =~ s/^\[//){
# spent 800ns making 2 calls to Mouse::Util::TypeConstraints::CORE:subst, avg 400ns/call
313 my $type = _parse_type($c, 1);
314
315 if($c->{spec} =~ s/^\]//){
316 return $type;
317 }
318 Carp::croak("Syntax error in type: missing right square bracket in '$c->{orig}'");
319 }
320
321 return undef;
322}
323
324# name : [\w.:]+
325
# spent 57µs (21+37) within Mouse::Util::TypeConstraints::_parse_name which was called 2 times, avg 29µs/call: # 2 times (21µs+37µs) by Mouse::Util::TypeConstraints::_parse_single_type at line 338, avg 29µs/call
sub _parse_name {
326631µs my($c, $create) = @_;
327
328210µs if($c->{spec} =~ s/\A ([\w.:]+) //xms){
# spent 10µs making 2 calls to Mouse::Util::TypeConstraints::CORE:subst, avg 5µs/call
329227µs return _find_or_create_regular_type($1, $create);
# spent 27µs making 2 calls to Mouse::Util::TypeConstraints::_find_or_create_regular_type, avg 14µs/call
330 }
331 Carp::croak("Syntax error in type: expect type name near '$c->{spec}' in '$c->{orig}'");
332}
333
334# single_type : name param
335
# spent 92µs (20+71) within Mouse::Util::TypeConstraints::_parse_single_type which was called 2 times, avg 46µs/call: # 2 times (20µs+71µs) by Mouse::Util::TypeConstraints::_parse_type at line 361, avg 46µs/call
sub _parse_single_type {
3361018µs my($c, $create) = @_;
337
338257µs my $type = _parse_name($c, $create);
# spent 57µs making 2 calls to Mouse::Util::TypeConstraints::_parse_name, avg 29µs/call
339214µs my $param = _parse_param($c);
# spent 14µs making 2 calls to Mouse::Util::TypeConstraints::_parse_param, avg 7µs/call
340
341 if(defined $type){
342 if(defined $param){
343 return _find_or_create_parameterized_type($type, $param);
344 }
345 else {
346 return $type;
347 }
348 }
349 elsif(defined $param){
350 Carp::croak("Undefined type with parameter [$param] in '$c->{orig}'");
351 }
352 else{
353 return undef;
354 }
355}
356
357# type : single_type ('|' single_type)*
358
# spent 106µs (15+92) within Mouse::Util::TypeConstraints::_parse_type which was called 2 times, avg 53µs/call: # 2 times (15µs+92µs) by Mouse::Util::TypeConstraints::find_or_parse_type_constraint at line 405, avg 53µs/call
sub _parse_type {
359814µs my($c, $create) = @_;
360
361292µs my $type = _parse_single_type($c, $create);
# spent 92µs making 2 calls to Mouse::Util::TypeConstraints::_parse_single_type, avg 46µs/call
362 if($c->{spec}){ # can be an union type
363 my @types;
364 while($c->{spec} =~ s/^\|//){
365 push @types, _parse_single_type($c, $create);
366 }
367 if(@types){
368 return _find_or_create_union_type($type, @types);
369 }
370 }
371 return $type;
372}
373
374
375
# spent 96µs (76+20) within Mouse::Util::TypeConstraints::find_type_constraint which was called 8 times, avg 12µs/call: # 8 times (76µs+20µs) by Mouse::init_meta at line 143 of Mouse.pm, avg 12µs/call
sub find_type_constraint {
3763298µs my($spec) = @_;
37789µs return $spec if Mouse::Util::is_a_type_constraint($spec) or not defined $spec;
# spent 9µs making 8 calls to Mouse::Util::is_a_type_constraint, avg 1µs/call
378
379810µs $spec =~ s/\s+//g;
# spent 10µs making 8 calls to Mouse::Util::TypeConstraints::CORE:subst, avg 1µs/call
380 return $TYPE{$spec};
381}
382
383sub register_type_constraint {
384 my($constraint) = @_;
385 Carp::croak("No type supplied / type is not a valid type constraint")
386 unless Mouse::Util::is_a_type_constraint($constraint);
387 return $TYPE{$constraint->name} = $constraint;
388}
389
390
# spent 515µs (356+159) within Mouse::Util::TypeConstraints::find_or_parse_type_constraint which was called 51 times, avg 10µs/call: # 51 times (356µs+159µs) by Mouse::Util::TypeConstraints::find_or_create_isa_type_constraint at line 422, avg 10µs/call
sub find_or_parse_type_constraint {
391263486µs my($spec) = @_;
3925153µs return $spec if Mouse::Util::is_a_type_constraint($spec) or not defined $spec;
# spent 53µs making 51 calls to Mouse::Util::is_a_type_constraint, avg 1µs/call
393
394 $spec =~ tr/ \t\r\n//d;
395
396 my $tc = $TYPE{$spec};
397 if(defined $tc) {
398 return $tc;
399 }
400
401 my %context = (
402 spec => $spec,
403 orig => $spec,
404 );
4052106µs $tc = _parse_type(\%context);
# spent 106µs making 2 calls to Mouse::Util::TypeConstraints::_parse_type, avg 53µs/call
406
407 if($context{spec}){
408 Carp::croak("Syntax error: extra elements '$context{spec}' in '$context{orig}'");
409 }
410
411 return $TYPE{$spec} = $tc;
412}
413
414sub find_or_create_does_type_constraint{
415 # XXX: Moose does not register a new role_type, but Mouse does.
416 my $tc = find_or_parse_type_constraint(@_);
417 return defined($tc) ? $tc : role_type(@_);
418}
419
420
# spent 1.01ms (243µs+765µs) within Mouse::Util::TypeConstraints::find_or_create_isa_type_constraint which was called 51 times, avg 20µs/call: # 43 times (201µs+730µs) by Mouse::Meta::Attribute::_process_options at line 56 of Mouse/Meta/Attribute.pm, avg 22µs/call # 8 times (42µs+36µs) by Mouse::Util::TypeConstraints::_define_type at line 134, avg 10µs/call
sub find_or_create_isa_type_constraint {
421 # XXX: Moose does not register a new class_type, but Mouse does.
422102216µs51515µs my $tc = find_or_parse_type_constraint(@_);
# spent 515µs making 51 calls to Mouse::Util::TypeConstraints::find_or_parse_type_constraint, avg 10µs/call
4232281µs return defined($tc) ? $tc : class_type(@_);
# spent 281µs making 2 calls to Mouse::Util::TypeConstraints::class_type, avg 141µs/call
424}
425
426132µs1;
427__END__
 
# spent 19µs within Mouse::Util::TypeConstraints::CORE:match which was called 8 times, avg 2µs/call: # 8 times (19µs+0s) by Mouse::Util::TypeConstraints::_define_type at line 143, avg 2µs/call
sub Mouse::Util::TypeConstraints::CORE:match; # opcode
# spent 21µs within Mouse::Util::TypeConstraints::CORE:subst which was called 12 times, avg 2µs/call: # 8 times (10µs+0s) by Mouse::Util::TypeConstraints::find_type_constraint at line 379, avg 1µs/call # 2 times (10µs+0s) by Mouse::Util::TypeConstraints::_parse_name at line 328, avg 5µs/call # 2 times (800ns+0s) by Mouse::Util::TypeConstraints::_parse_param at line 312, avg 400ns/call
sub Mouse::Util::TypeConstraints::CORE:subst; # opcode