← Index
NYTProf Performance Profile   « line view »
For examples/Atom-timer.pl
  Run on Mon Aug 12 14:45:28 2013
Reported on Mon Aug 12 14:46:14 2013

Filename/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm
StatementsExecuted 355 statements in 2.91ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111392µs6.53msMoose::Util::TypeConstraints::Builtins::::define_builtinsMoose::Util::TypeConstraints::Builtins::define_builtins
3611184µs926µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:66]Moose::Util::TypeConstraints::Builtins::__ANON__[:66]
161172µs652µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:237]Moose::Util::TypeConstraints::Builtins::__ANON__[:237]
101165µs524µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:83]Moose::Util::TypeConstraints::Builtins::__ANON__[:83]
131149µs623µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:112]Moose::Util::TypeConstraints::Builtins::__ANON__[:112]
121142µs574µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:120]Moose::Util::TypeConstraints::Builtins::__ANON__[:120]
371142µs42µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:46]Moose::Util::TypeConstraints::Builtins::__ANON__[:46]
311138µs38µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:223]Moose::Util::TypeConstraints::Builtins::__ANON__[:223]
1616119µs19µsMoose::Util::TypeConstraints::Builtins::::whereMoose::Util::TypeConstraints::Builtins::where
131118µs18µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:125]Moose::Util::TypeConstraints::Builtins::__ANON__[:125]
1717115µs15µsMoose::Util::TypeConstraints::Builtins::::inline_asMoose::Util::TypeConstraints::Builtins::inline_as
51115µs15µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:58]Moose::Util::TypeConstraints::Builtins::__ANON__[:58]
21114µs17µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:222]Moose::Util::TypeConstraints::Builtins::__ANON__[:222]
1616114µs14µsMoose::Util::TypeConstraints::Builtins::::asMoose::Util::TypeConstraints::Builtins::as
1616113µs13µsMoose::Util::TypeConstraints::Builtins::::subtypeMoose::Util::TypeConstraints::Builtins::subtype
1119µs9µsMoose::Util::TypeConstraints::Builtins::::BEGIN@2Moose::Util::TypeConstraints::Builtins::BEGIN@2
1119µs29µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:176]Moose::Util::TypeConstraints::Builtins::__ANON__[:176]
1118µs80µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:272]Moose::Util::TypeConstraints::Builtins::__ANON__[:272]
4118µs8µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:195]Moose::Util::TypeConstraints::Builtins::__ANON__[:195]
1118µs9µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:257]Moose::Util::TypeConstraints::Builtins::__ANON__[:257]
1117µs29µsMoose::Util::TypeConstraints::Builtins::::BEGIN@12Moose::Util::TypeConstraints::Builtins::BEGIN@12
1116µs10µsMoose::Util::TypeConstraints::Builtins::::BEGIN@10Moose::Util::TypeConstraints::Builtins::BEGIN@10
1116µs34µsMoose::Util::TypeConstraints::Builtins::::BEGIN@14Moose::Util::TypeConstraints::Builtins::BEGIN@14
1116µs17µsMoose::Util::TypeConstraints::Builtins::::BEGIN@9Moose::Util::TypeConstraints::Builtins::BEGIN@9
2114µs4µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:157]Moose::Util::TypeConstraints::Builtins::__ANON__[:157]
1113µs3µsMoose::Util::TypeConstraints::Builtins::::BEGIN@13Moose::Util::TypeConstraints::Builtins::BEGIN@13
1113µs3µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:152]Moose::Util::TypeConstraints::Builtins::__ANON__[:152]
2113µs3µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:163]Moose::Util::TypeConstraints::Builtins::__ANON__[:163]
2112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:28]Moose::Util::TypeConstraints::Builtins::__ANON__[:28]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:137]Moose::Util::TypeConstraints::Builtins::__ANON__[:137]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:258]Moose::Util::TypeConstraints::Builtins::__ANON__[:258]
1111µs1µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:132]Moose::Util::TypeConstraints::Builtins::__ANON__[:132]
1111µs1µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:39]Moose::Util::TypeConstraints::Builtins::__ANON__[:39]
1111µs1µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:72]Moose::Util::TypeConstraints::Builtins::__ANON__[:72]
1111µs1µsMoose::Util::TypeConstraints::Builtins::::typeMoose::Util::TypeConstraints::Builtins::type
111900ns900nsMoose::Util::TypeConstraints::Builtins::::__ANON__[:291]Moose::Util::TypeConstraints::Builtins::__ANON__[:291]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:116]Moose::Util::TypeConstraints::Builtins::__ANON__[:116]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:124]Moose::Util::TypeConstraints::Builtins::__ANON__[:124]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:136]Moose::Util::TypeConstraints::Builtins::__ANON__[:136]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:146]Moose::Util::TypeConstraints::Builtins::__ANON__[:146]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:156]Moose::Util::TypeConstraints::Builtins::__ANON__[:156]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:161]Moose::Util::TypeConstraints::Builtins::__ANON__[:161]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:169]Moose::Util::TypeConstraints::Builtins::__ANON__[:169]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:184]Moose::Util::TypeConstraints::Builtins::__ANON__[:184]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:190]Moose::Util::TypeConstraints::Builtins::__ANON__[:190]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:191]Moose::Util::TypeConstraints::Builtins::__ANON__[:191]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:202]Moose::Util::TypeConstraints::Builtins::__ANON__[:202]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:212]Moose::Util::TypeConstraints::Builtins::__ANON__[:212]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:221]Moose::Util::TypeConstraints::Builtins::__ANON__[:221]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:247]Moose::Util::TypeConstraints::Builtins::__ANON__[:247]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:256]Moose::Util::TypeConstraints::Builtins::__ANON__[:256]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:27]Moose::Util::TypeConstraints::Builtins::__ANON__[:27]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:282]Moose::Util::TypeConstraints::Builtins::__ANON__[:282]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:289]Moose::Util::TypeConstraints::Builtins::__ANON__[:289]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:290]Moose::Util::TypeConstraints::Builtins::__ANON__[:290]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:298]Moose::Util::TypeConstraints::Builtins::__ANON__[:298]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:32]Moose::Util::TypeConstraints::Builtins::__ANON__[:32]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:36]Moose::Util::TypeConstraints::Builtins::__ANON__[:36]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:43]Moose::Util::TypeConstraints::Builtins::__ANON__[:43]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:50]Moose::Util::TypeConstraints::Builtins::__ANON__[:50]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:62]Moose::Util::TypeConstraints::Builtins::__ANON__[:62]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:70]Moose::Util::TypeConstraints::Builtins::__ANON__[:70]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:76]Moose::Util::TypeConstraints::Builtins::__ANON__[:76]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:97]Moose::Util::TypeConstraints::Builtins::__ANON__[:97]
0000s0sMoose::Util::TypeConstraints::Builtins::::optimize_asMoose::Util::TypeConstraints::Builtins::optimize_as
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Util::TypeConstraints::Builtins;
2
# spent 9µs within Moose::Util::TypeConstraints::Builtins::BEGIN@2 which was called: # once (9µs+0s) by Moose::Meta::Attribute::BEGIN@24 at line 4
BEGIN {
314µs $Moose::Util::TypeConstraints::Builtins::AUTHORITY = 'cpan:STEVAN';
4134µs19µs}
# spent 9µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@2
5{
62900ns $Moose::Util::TypeConstraints::Builtins::VERSION = '2.1005';
7}
8
9222µs228µs
# spent 17µs (6+11) within Moose::Util::TypeConstraints::Builtins::BEGIN@9 which was called: # once (6µs+11µs) by Moose::Meta::Attribute::BEGIN@24 at line 9
use strict;
# spent 17µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@9 # spent 11µs making 1 call to strict::import
10222µs214µs
# spent 10µs (6+4) within Moose::Util::TypeConstraints::Builtins::BEGIN@10 which was called: # once (6µs+4µs) by Moose::Meta::Attribute::BEGIN@24 at line 10
use warnings;
# spent 10µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@10 # spent 4µs making 1 call to warnings::import
11
12221µs251µs
# spent 29µs (7+22) within Moose::Util::TypeConstraints::Builtins::BEGIN@12 which was called: # once (7µs+22µs) by Moose::Meta::Attribute::BEGIN@24 at line 12
use Class::Load qw( is_class_loaded );
# spent 29µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@12 # spent 22µs making 1 call to Exporter::import
13226µs13µs
# spent 3µs within Moose::Util::TypeConstraints::Builtins::BEGIN@13 which was called: # once (3µs+0s) by Moose::Meta::Attribute::BEGIN@24 at line 13
use List::MoreUtils ();
# spent 3µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@13
1421.83ms261µs
# spent 34µs (6+27) within Moose::Util::TypeConstraints::Builtins::BEGIN@14 which was called: # once (6µs+27µs) by Moose::Meta::Attribute::BEGIN@24 at line 14
use Scalar::Util qw( blessed looks_like_number reftype );
# spent 34µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@14 # spent 27µs making 1 call to Exporter::import
15
1613µs1310µs
# spent 1µs within Moose::Util::TypeConstraints::Builtins::type which was called: # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 28
sub type { goto &Moose::Util::TypeConstraints::type }
# spent 310µs making 1 call to Moose::Util::TypeConstraints::type
171645µs164.77ms
# spent 13µs within Moose::Util::TypeConstraints::Builtins::subtype which was called 16 times, avg 812ns/call: # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 46 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 32 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 112 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 163 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 72 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 125 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 39 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 120 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 58 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 132 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 157 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 137 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 152 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 176 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 83 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 66
sub subtype { goto &Moose::Util::TypeConstraints::subtype }
# spent 4.77ms making 16 calls to Moose::Util::TypeConstraints::subtype, avg 298µs/call
181645µs1623µs
# spent 14µs within Moose::Util::TypeConstraints::Builtins::as which was called 16 times, avg 862ns/call: # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 176 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 152 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 32 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 120 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 39 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 72 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 112 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 46 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 132 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 58 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 66 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 83 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 163 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 125 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 137 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 157
sub as { goto &Moose::Util::TypeConstraints::as }
# spent 23µs making 16 calls to Moose::Util::TypeConstraints::as, avg 1µs/call
191660µs1619µs
# spent 19µs within Moose::Util::TypeConstraints::Builtins::where which was called 16 times, avg 1µs/call: # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 28 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 39 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 120 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 125 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 72 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 137 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 46 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 176 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 152 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 83 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 66 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 163 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 157 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 58 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 132 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 112
sub where (&) { goto &Moose::Util::TypeConstraints::where }
# spent 19µs making 16 calls to Moose::Util::TypeConstraints::where, avg 1µs/call
20sub optimize_as (&) { goto &Moose::Util::TypeConstraints::optimize_as }
211750µs1717µs
# spent 15µs within Moose::Util::TypeConstraints::Builtins::inline_as which was called 17 times, avg 888ns/call: # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 32 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 39 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 28 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 120 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 112 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 125 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 137 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 157 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 46 # once (900ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 176 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 72 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 163 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 58 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 132 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 83 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 66 # once (800ns+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 152
sub inline_as (&) { goto &Moose::Util::TypeConstraints::inline_as }
# spent 17µs making 17 calls to Moose::Util::TypeConstraints::inline_as, avg 1µs/call
22
23
# spent 6.53ms (392µs+6.14) within Moose::Util::TypeConstraints::Builtins::define_builtins which was called: # once (392µs+6.14ms) by Moose::Meta::Attribute::BEGIN@24 at line 727 of Moose/Util/TypeConstraints.pm
sub define_builtins {
241300ns my $registry = shift;
25
26 type 'Any' # meta-type including all
27 => where {1}
28311µs34µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:28] which was called 2 times, avg 950ns/call: # 2 times (2µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 950ns/call
=> inline_as { '1' };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::type
29
30 subtype 'Item' # base type
31 => as 'Any'
3216µs33µs => inline_as { '1' };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
33
34 subtype 'Undef'
35 => as 'Item'
36 => where { !defined($_) }
37
# spent 1µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:39] which was called: # once (1µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
3813µs '!defined(' . $_[1] . ')'
3918µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
40
41 subtype 'Defined'
42 => as 'Item'
43 => where { defined($_) }
44
# spent 42µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:46] which was called 37 times, avg 1µs/call: # 37 times (42µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 1µs/call
=> inline_as {
453772µs 'defined(' . $_[1] . ')'
4617µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
47
48 subtype 'Bool'
49 => as 'Item'
50 => where { !defined($_) || $_ eq "" || "$_" eq '1' || "$_" eq '0' }
51
# spent 15µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:58] which was called 5 times, avg 3µs/call: # 5 times (15µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 3µs/call
=> inline_as {
52519µs '('
53 . '!defined(' . $_[1] . ') '
54 . '|| ' . $_[1] . ' eq "" '
55 . '|| (' . $_[1] . '."") eq "1" '
56 . '|| (' . $_[1] . '."") eq "0"'
57 . ')'
5818µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
59
60 subtype 'Value'
61 => as 'Defined'
62 => where { !ref($_) }
63
# spent 926µs (184+743) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:66] which was called 36 times, avg 26µs/call: # 36 times (184µs+743µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 26µs/call
=> inline_as {
6436117µs7231µs $_[0]->parent()->_inline_check($_[1])
# spent 31µs making 36 calls to Moose::Meta::TypeConstraint::parent, avg 861ns/call # spent 712µs making 36 calls to Moose::Meta::TypeConstraint::_inline_check, avg 20µs/call, recursion: max depth 2, sum of overlapping time 712µs
65 . ' && !ref(' . $_[1] . ')'
6617µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
67
68 subtype 'Ref'
69 => as 'Defined'
70 => where { ref($_) }
71 # no need to call parent - ref also checks for definedness
72210µs44µs
# spent 1µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:72] which was called: # once (1µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as { 'ref(' . $_[1] . ')' };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
73
74 subtype 'Str'
75 => as 'Value'
76 => where { ref(\$_) eq 'SCALAR' || ref(\(my $val = $_)) eq 'SCALAR' }
77
# spent 524µs (65+459) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:83] which was called 10 times, avg 52µs/call: # 10 times (65µs+459µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 52µs/call
=> inline_as {
781046µs2010µs $_[0]->parent()->_inline_check($_[1])
# spent 10µs making 10 calls to Moose::Meta::TypeConstraint::parent, avg 1µs/call # spent 449µs making 10 calls to Moose::Meta::TypeConstraint::_inline_check, avg 45µs/call, recursion: max depth 1, sum of overlapping time 449µs
79 . ' && ('
80 . 'ref(\\' . $_[1] . ') eq "SCALAR"'
81 . ' || ref(\\(my $val = ' . $_[1] . ')) eq "SCALAR"'
82 . ')'
8318µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
84
8511µs113µs my $value_type = Moose::Util::TypeConstraints::find_type_constraint('Value');
# spent 13µs making 1 call to Moose::Util::TypeConstraints::find_type_constraint
86 subtype 'Num'
87 => as 'Str'
88 => where {
89 my $val = $_;
90 ($val =~ /\A[+-]?[0-9]+\z/) ||
91 ( $val =~ /\A(?:[+-]?) #matches optional +- in the beginning
92 (?=[0-9]|\.[0-9]) #matches previous +- only if there is something like 3 or .3
93 [0-9]* #matches 0-9 zero or more times
94 (?:\.[0-9]+)? #matches optional .89 or nothing
95 (?:[Ee](?:[+-]?[0-9]+))? #matches E1 or e1 or e-1 or e+1 etc
96 \z/x );
97 }
98
# spent 623µs (49+574) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:112] which was called 13 times, avg 48µs/call: # 13 times (49µs+574µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 48µs/call
=> inline_as {
99 # the long Str tests are redundant here
100 #storing $_[1] in a temporary value,
101 #so that $_[1] won't get converted to a string for regex match
102 #see t/attributes/numeric_defaults.t for more details
1031349µs130s 'my $val = '.$_[1].';'.
# spent 574µs making 13 calls to Moose::Meta::TypeConstraint::_inline_check, avg 44µs/call, recursion: max depth 1, sum of overlapping time 574µs
104 $value_type->_inline_check('$val')
105 .' && ( $val =~ /\A[+-]?[0-9]+\z/ || '
106 . '$val =~ /\A(?:[+-]?) #matches optional +- in the beginning
107 (?=[0-9]|\.[0-9]) #matches previous +- only if there is something like 3 or .3
108 [0-9]* #matches 0-9 zero or more times
109 (?:\.[0-9]+)? #matches optional .89 or nothing
110 (?:[Ee](?:[+-]?[0-9]+))? #matches E1 or e1 or e-1 or e+1 etc
111 \z/x ); '
11217µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
113
114 subtype 'Int'
115 => as 'Num'
116 => where { (my $val = $_) =~ /\A-?[0-9]+\z/ }
117
# spent 574µs (42+532) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:120] which was called 12 times, avg 48µs/call: # 12 times (42µs+532µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 48µs/call
=> inline_as {
1181235µs120s $value_type->_inline_check($_[1])
# spent 532µs making 12 calls to Moose::Meta::TypeConstraint::_inline_check, avg 44µs/call, recursion: max depth 1, sum of overlapping time 532µs
119 . ' && (my $val = ' . $_[1] . ') =~ /\A-?[0-9]+\z/'
12017µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
121
122 subtype 'CodeRef'
123 => as 'Ref'
124 => where { ref($_) eq 'CODE' }
1251437µs44µs
# spent 18µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:125] which was called 13 times, avg 1µs/call: # 13 times (18µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 1µs/call
=> inline_as { 'ref(' . $_[1] . ') eq "CODE"' };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
126
127 subtype 'RegexpRef'
128 => as 'Ref'
129 => where( \&_RegexpRef )
130
# spent 1µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:132] which was called: # once (1µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
13113µs 'Moose::Util::TypeConstraints::Builtins::_RegexpRef(' . $_[1] . ')'
13216µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
133
134 subtype 'GlobRef'
135 => as 'Ref'
136 => where { ref($_) eq 'GLOB' }
137216µs44µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:137] which was called: # once (2µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as { 'ref(' . $_[1] . ') eq "GLOB"' };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
138
139 # NOTE: scalar filehandles are GLOB refs, but a GLOB ref is not always a
140 # filehandle
141 subtype 'FileHandle'
142 => as 'Ref'
143 => where {
144 (ref($_) eq "GLOB" && Scalar::Util::openhandle($_))
145 || (blessed($_) && $_->isa("IO::Handle"));
146 }
147
# spent 3µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:152] which was called: # once (3µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
14815µs '(ref(' . $_[1] . ') eq "GLOB" '
149 . '&& Scalar::Util::openhandle(' . $_[1] . ')) '
150 . '|| (Scalar::Util::blessed(' . $_[1] . ') '
151 . '&& ' . $_[1] . '->isa("IO::Handle"))'
15218µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
153
154 subtype 'Object'
155 => as 'Ref'
156 => where { blessed($_) }
157313µs44µs
# spent 4µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:157] which was called 2 times, avg 2µs/call: # 2 times (4µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 2µs/call
=> inline_as { 'Scalar::Util::blessed(' . $_[1] . ')' };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
158
159 subtype 'ClassName'
160 => as 'Str'
161 => where { is_class_loaded($_) }
162 # the long Str tests are redundant here
163312µs44µs
# spent 3µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:163] which was called 2 times, avg 1µs/call: # 2 times (3µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 1µs/call
=> inline_as { 'Class::Load::is_class_loaded(' . $_[1] . ')' };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
164
165 subtype 'RoleName'
166 => as 'ClassName'
167 => where {
168 (Class::MOP::class_of($_) || return)->isa('Moose::Meta::Role');
169 }
170
# spent 29µs (9+21) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:176] which was called: # once (9µs+21µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
17115µs2900ns $_[0]->parent()->_inline_check($_[1])
# spent 900ns making 1 call to Moose::Meta::TypeConstraint::parent # spent 20µs making 1 call to Moose::Meta::TypeConstraint::_inline_check, recursion: max depth 1, sum of overlapping time 20µs
172 . ' && do {'
173 . 'my $meta = Class::MOP::class_of(' . $_[1] . ');'
174 . '$meta && $meta->isa("Moose::Meta::Role");'
175 . '}'
17617µs44µs };
# spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 900ns making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 800ns making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
177
178 $registry->add_type_constraint(
179 Moose::Meta::TypeConstraint::Parameterizable->new(
180 name => 'ScalarRef',
181 package_defined_in => __PACKAGE__,
182 parent =>
183 Moose::Util::TypeConstraints::find_type_constraint('Ref'),
184 constraint => sub { ref($_) eq 'SCALAR' || ref($_) eq 'REF' },
185 constraint_generator => sub {
186 my $type_parameter = shift;
187 my $check = $type_parameter->_compiled_type_constraint;
188 return sub {
189 return $check->( ${$_} );
190 };
191 },
192
# spent 8µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:195] which was called 4 times, avg 2µs/call: # 4 times (8µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 2µs/call
inlined => sub {
193412µs 'ref(' . $_[1] . ') eq "SCALAR" '
194 . '|| ref(' . $_[1] . ') eq "REF"'
195 },
196 inline_generator => sub {
197 my $self = shift;
198 my $type_parameter = shift;
199 my $val = shift;
200 '(ref(' . $val . ') eq "SCALAR" || ref(' . $val . ') eq "REF") '
201 . '&& ' . $type_parameter->_inline_check('${(' . $val . ')}')
202 },
203 )
204110µs3301µs );
# spent 272µs making 1 call to Moose::Meta::TypeConstraint::new # spent 16µs making 1 call to Moose::Meta::TypeConstraint::Registry::add_type_constraint # spent 13µs making 1 call to Moose::Util::TypeConstraints::find_type_constraint
205
206 $registry->add_type_constraint(
207 Moose::Meta::TypeConstraint::Parameterizable->new(
208 name => 'ArrayRef',
209 package_defined_in => __PACKAGE__,
210 parent =>
211 Moose::Util::TypeConstraints::find_type_constraint('Ref'),
212 constraint => sub { ref($_) eq 'ARRAY' },
213
# spent 17µs (14+2) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:222] which was called 2 times, avg 8µs/call: # 2 times (14µs+2µs) by Moose::Meta::TypeConstraint::Parameterizable::generate_constraint_for at line 36 of Moose/Meta/TypeConstraint/Parameterizable.pm, avg 8µs/call
constraint_generator => sub {
2142400ns my $type_parameter = shift;
21522µs22µs my $check = $type_parameter->_compiled_type_constraint;
# spent 2µs making 2 calls to Moose::Meta::TypeConstraint::_compiled_type_constraint, avg 1µs/call
216 return sub {
217 foreach my $x (@$_) {
218 ( $check->($x) ) || return;
219 }
220 1;
221 }
22229µs },
2233164µs
# spent 38µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:223] which was called 31 times, avg 1µs/call: # 31 times (38µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 1µs/call
inlined => sub { 'ref(' . $_[1] . ') eq "ARRAY"' },
224
# spent 652µs (72+579) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:237] which was called 16 times, avg 41µs/call: # 16 times (72µs+579µs) by Moose::Meta::TypeConstraint::Parameterizable::generate_inline_for at line 63 of Moose/Meta/TypeConstraint/Parameterizable.pm, avg 41µs/call
inline_generator => sub {
225162µs my $self = shift;
22616200ns my $type_parameter = shift;
227162µs my $val = shift;
228
2291654µs16579µs 'do {'
# spent 579µs making 16 calls to Moose::Meta::TypeConstraint::_inline_check, avg 36µs/call
230 . 'my $check = ' . $val . ';'
231 . 'ref($check) eq "ARRAY" '
232 . '&& &List::MoreUtils::all('
233 . 'sub { ' . $type_parameter->_inline_check('$_') . ' }, '
234 . '@{$check}'
235 . ')'
236 . '}';
237 },
238 )
23917µs3210µs );
# spent 183µs making 1 call to Moose::Meta::TypeConstraint::new # spent 14µs making 1 call to Moose::Meta::TypeConstraint::Registry::add_type_constraint # spent 13µs making 1 call to Moose::Util::TypeConstraints::find_type_constraint
240
241 $registry->add_type_constraint(
242 Moose::Meta::TypeConstraint::Parameterizable->new(
243 name => 'HashRef',
244 package_defined_in => __PACKAGE__,
245 parent =>
246 Moose::Util::TypeConstraints::find_type_constraint('Ref'),
247 constraint => sub { ref($_) eq 'HASH' },
248
# spent 9µs (8+1) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:257] which was called: # once (8µs+1µs) by Moose::Meta::TypeConstraint::Parameterizable::generate_constraint_for at line 36 of Moose/Meta/TypeConstraint/Parameterizable.pm
constraint_generator => sub {
2491300ns my $type_parameter = shift;
25011µs11µs my $check = $type_parameter->_compiled_type_constraint;
251 return sub {
252 foreach my $x ( values %$_ ) {
253 ( $check->($x) ) || return;
254 }
255 1;
256 }
25715µs },
25814µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:258] which was called: # once (2µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
inlined => sub { 'ref(' . $_[1] . ') eq "HASH"' },
259
# spent 80µs (8+72) within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:272] which was called: # once (8µs+72µs) by Moose::Meta::TypeConstraint::Parameterizable::generate_inline_for at line 63 of Moose/Meta/TypeConstraint/Parameterizable.pm
inline_generator => sub {
2601200ns my $self = shift;
2611200ns my $type_parameter = shift;
2621400ns my $val = shift;
263
26417µs172µs 'do {'
# spent 72µs making 1 call to Moose::Meta::TypeConstraint::_inline_check
265 . 'my $check = ' . $val . ';'
266 . 'ref($check) eq "HASH" '
267 . '&& &List::MoreUtils::all('
268 . 'sub { ' . $type_parameter->_inline_check('$_') . ' }, '
269 . 'values %{$check}'
270 . ')'
271 . '}';
272 },
273 )
27417µs3211µs );
# spent 184µs making 1 call to Moose::Meta::TypeConstraint::new # spent 14µs making 1 call to Moose::Meta::TypeConstraint::Registry::add_type_constraint # spent 13µs making 1 call to Moose::Util::TypeConstraints::find_type_constraint
275
276 $registry->add_type_constraint(
277 Moose::Meta::TypeConstraint::Parameterizable->new(
278 name => 'Maybe',
279 package_defined_in => __PACKAGE__,
280 parent =>
281 Moose::Util::TypeConstraints::find_type_constraint('Item'),
282 constraint => sub {1},
283 constraint_generator => sub {
284 my $type_parameter = shift;
285 my $check = $type_parameter->_compiled_type_constraint;
286 return sub {
287 return 1 if not( defined($_) ) || $check->($_);
288 return;
289 }
290 },
29115µs
# spent 900ns within Moose::Util::TypeConstraints::Builtins::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:291] which was called: # once (900ns+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
inlined => sub {'1'},
292 inline_generator => sub {
293 my $self = shift;
294 my $type_parameter = shift;
295 my $val = shift;
296 '!defined(' . $val . ') '
297 . '|| (' . $type_parameter->_inline_check($val) . ')'
298 },
299 )
300112µs3205µs );
# spent 178µs making 1 call to Moose::Meta::TypeConstraint::new # spent 14µs making 1 call to Moose::Meta::TypeConstraint::Registry::add_type_constraint # spent 13µs making 1 call to Moose::Util::TypeConstraints::find_type_constraint
301}
302
30313µs1;
304
305__END__