← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:41 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm
StatementsExecuted 138 statements in 3.64ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111582µs14.8msMoose::Util::TypeConstraints::Builtins::::define_builtinsMoose::Util::TypeConstraints::Builtins::define_builtins
61157µs243µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:66]Moose::Util::TypeConstraints::Builtins::__ANON__[:66]
1616128µs28µsMoose::Util::TypeConstraints::Builtins::::whereMoose::Util::TypeConstraints::Builtins::where
1717121µs21µsMoose::Util::TypeConstraints::Builtins::::inline_asMoose::Util::TypeConstraints::Builtins::inline_as
1616120µs20µsMoose::Util::TypeConstraints::Builtins::::subtypeMoose::Util::TypeConstraints::Builtins::subtype
1616119µs19µsMoose::Util::TypeConstraints::Builtins::::asMoose::Util::TypeConstraints::Builtins::as
11119µs60µsMoose::Util::TypeConstraints::Builtins::::BEGIN@12Moose::Util::TypeConstraints::Builtins::BEGIN@12
31119µs224µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:120]Moose::Util::TypeConstraints::Builtins::__ANON__[:120]
71113µs13µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:46]Moose::Util::TypeConstraints::Builtins::__ANON__[:46]
11113µs13µsMoose::Util::TypeConstraints::Builtins::::BEGIN@2Moose::Util::TypeConstraints::Builtins::BEGIN@2
11112µs83µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:83]Moose::Util::TypeConstraints::Builtins::__ANON__[:83]
11111µs40µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:176]Moose::Util::TypeConstraints::Builtins::__ANON__[:176]
11111µs18µsMoose::Util::TypeConstraints::Builtins::::BEGIN@10Moose::Util::TypeConstraints::Builtins::BEGIN@10
11110µs29µsMoose::Util::TypeConstraints::Builtins::::BEGIN@9Moose::Util::TypeConstraints::Builtins::BEGIN@9
11110µs56µsMoose::Util::TypeConstraints::Builtins::::BEGIN@14Moose::Util::TypeConstraints::Builtins::BEGIN@14
1119µs68µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:112]Moose::Util::TypeConstraints::Builtins::__ANON__[:112]
1118µs8µsMoose::Util::TypeConstraints::Builtins::::BEGIN@13Moose::Util::TypeConstraints::Builtins::BEGIN@13
2114µs4µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:163]Moose::Util::TypeConstraints::Builtins::__ANON__[:163]
1114µs4µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:152]Moose::Util::TypeConstraints::Builtins::__ANON__[:152]
1114µs4µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:58]Moose::Util::TypeConstraints::Builtins::__ANON__[:58]
1113µs3µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:195]Moose::Util::TypeConstraints::Builtins::__ANON__[:195]
1113µs3µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:125]Moose::Util::TypeConstraints::Builtins::__ANON__[:125]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:137]Moose::Util::TypeConstraints::Builtins::__ANON__[:137]
2112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:28]Moose::Util::TypeConstraints::Builtins::__ANON__[:28]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:223]Moose::Util::TypeConstraints::Builtins::__ANON__[:223]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:258]Moose::Util::TypeConstraints::Builtins::__ANON__[:258]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:39]Moose::Util::TypeConstraints::Builtins::__ANON__[:39]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:72]Moose::Util::TypeConstraints::Builtins::__ANON__[:72]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:132]Moose::Util::TypeConstraints::Builtins::__ANON__[:132]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::__ANON__[:157]Moose::Util::TypeConstraints::Builtins::__ANON__[:157]
1112µs2µsMoose::Util::TypeConstraints::Builtins::::typeMoose::Util::TypeConstraints::Builtins::type
1111µs1µsMoose::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__[:222]Moose::Util::TypeConstraints::Builtins::__ANON__[:222]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:237]Moose::Util::TypeConstraints::Builtins::__ANON__[:237]
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__[:257]Moose::Util::TypeConstraints::Builtins::__ANON__[:257]
0000s0sMoose::Util::TypeConstraints::Builtins::::__ANON__[:272]Moose::Util::TypeConstraints::Builtins::__ANON__[:272]
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 13µs within Moose::Util::TypeConstraints::Builtins::BEGIN@2 which was called: # once (13µs+0s) by Moose::Meta::Attribute::BEGIN@24 at line 4
BEGIN {
317µs $Moose::Util::TypeConstraints::Builtins::AUTHORITY = 'cpan:STEVAN';
4150µs113µs}
# spent 13µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@2
5{
622µs $Moose::Util::TypeConstraints::Builtins::VERSION = '2.1005';
7}
8
9239µs248µs
# spent 29µs (10+19) within Moose::Util::TypeConstraints::Builtins::BEGIN@9 which was called: # once (10µs+19µs) by Moose::Meta::Attribute::BEGIN@24 at line 9
use strict;
# spent 29µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@9 # spent 19µs making 1 call to strict::import
10236µs226µs
# spent 18µs (11+7) within Moose::Util::TypeConstraints::Builtins::BEGIN@10 which was called: # once (11µs+7µs) by Moose::Meta::Attribute::BEGIN@24 at line 10
use warnings;
# spent 18µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@10 # spent 7µs making 1 call to warnings::import
11
12237µs2100µs
# spent 60µs (19+41) within Moose::Util::TypeConstraints::Builtins::BEGIN@12 which was called: # once (19µs+41µs) by Moose::Meta::Attribute::BEGIN@24 at line 12
use Class::Load qw( is_class_loaded );
# spent 60µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@12 # spent 41µs making 1 call to Exporter::import
13231µs18µs
# spent 8µs within Moose::Util::TypeConstraints::Builtins::BEGIN@13 which was called: # once (8µs+0s) by Moose::Meta::Attribute::BEGIN@24 at line 13
use List::MoreUtils ();
# spent 8µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@13
1422.72ms2102µs
# spent 56µs (10+46) within Moose::Util::TypeConstraints::Builtins::BEGIN@14 which was called: # once (10µs+46µs) by Moose::Meta::Attribute::BEGIN@24 at line 14
use Scalar::Util qw( blessed looks_like_number reftype );
# spent 56µs making 1 call to Moose::Util::TypeConstraints::Builtins::BEGIN@14 # spent 46µs making 1 call to Exporter::import
15
1614µs15.70ms
# spent 2µs within Moose::Util::TypeConstraints::Builtins::type which was called: # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 28
sub type { goto &Moose::Util::TypeConstraints::type }
# spent 5.70ms making 1 call to Moose::Util::TypeConstraints::type
171670µs166.93ms
# spent 20µs within Moose::Util::TypeConstraints::Builtins::subtype which was called 16 times, avg 1µs/call: # once (2µ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 157 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 112 # 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 39 # 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 125 # 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 163 # 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 176 # 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 132 # 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 66 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 83
sub subtype { goto &Moose::Util::TypeConstraints::subtype }
# spent 6.93ms making 16 calls to Moose::Util::TypeConstraints::subtype, avg 433µs/call
181664µs1632µs
# spent 19µs within Moose::Util::TypeConstraints::Builtins::as which was called 16 times, avg 1µs/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 58 # 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 83 # 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 152 # 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 163 # 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 137 # 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 132 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 112 # 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 46 # once (1µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 72
sub as { goto &Moose::Util::TypeConstraints::as }
# spent 32µs making 16 calls to Moose::Util::TypeConstraints::as, avg 2µs/call
191695µs1628µs
# spent 28µs within Moose::Util::TypeConstraints::Builtins::where which was called 16 times, avg 2µs/call: # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 163 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 28 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 112 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 176 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 83 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 72 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 157 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 39 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 152 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 120 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 66 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 58 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 46 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 137 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 125 # once (2µs+0s) by Moose::Util::TypeConstraints::Builtins::define_builtins at line 132
sub where (&) { goto &Moose::Util::TypeConstraints::where }
# spent 28µs making 16 calls to Moose::Util::TypeConstraints::where, avg 2µs/call
20sub optimize_as (&) { goto &Moose::Util::TypeConstraints::optimize_as }
211775µs1723µs
# spent 21µs within Moose::Util::TypeConstraints::Builtins::inline_as which was called 17 times, avg 1µs/call: # once (2µ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 28 # 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 112 # 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 66 # 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 58 # 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 163 # 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 157 # 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 39 # 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 137
sub inline_as (&) { goto &Moose::Util::TypeConstraints::inline_as }
# spent 23µs making 17 calls to Moose::Util::TypeConstraints::inline_as, avg 1µs/call
22
23
# spent 14.8ms (582µs+14.2) within Moose::Util::TypeConstraints::Builtins::define_builtins which was called: # once (582µs+14.2ms) by Moose::Meta::Attribute::BEGIN@24 at line 727 of Moose/Util/TypeConstraints.pm
sub define_builtins {
241400ns my $registry = shift;
25
26 type 'Any' # meta-type including all
27 => where {1}
28315µs35µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:28] which was called 2 times, avg 1µs/call: # 2 times (2µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 1µs/call
=> inline_as { '1' };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::type # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as
29
30 subtype 'Item' # base type
31 => as 'Any'
3218µs35µs => inline_as { '1' };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::subtype # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as
33
34 subtype 'Undef'
35 => as 'Item'
36 => where { !defined($_) }
37
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:39] which was called: # once (2µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
3816µs '!defined(' . $_[1] . ')'
39110µs45µs };
# 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::subtype # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as
40
41 subtype 'Defined'
42 => as 'Item'
43 => where { defined($_) }
44
# spent 13µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:46] which was called 7 times, avg 2µs/call: # 7 times (13µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 2µs/call
=> inline_as {
45724µs 'defined(' . $_[1] . ')'
46111µs45µs };
# 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::subtype # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as
47
48 subtype 'Bool'
49 => as 'Item'
50 => where { !defined($_) || $_ eq "" || "$_" eq '1' || "$_" eq '0' }
51
# spent 4µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:58] which was called: # once (4µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
5217µs '('
53 . '!defined(' . $_[1] . ') '
54 . '|| ' . $_[1] . ' eq "" '
55 . '|| (' . $_[1] . '."") eq "1" '
56 . '|| (' . $_[1] . '."") eq "0"'
57 . ')'
58111µs45µs };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
59
60 subtype 'Value'
61 => as 'Defined'
62 => where { !ref($_) }
63
# spent 243µs (57+186) within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:66] which was called 6 times, avg 40µs/call: # 6 times (57µs+186µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 40µs/call
=> inline_as {
64634µs129µs $_[0]->parent()->_inline_check($_[1])
# spent 9µs making 6 calls to Moose::Meta::TypeConstraint::parent, avg 2µs/call # spent 177µs making 6 calls to Moose::Meta::TypeConstraint::_inline_check, avg 29µs/call, recursion: max depth 2, sum of overlapping time 177µs
65 . ' && !ref(' . $_[1] . ')'
66110µs45µs };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs 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
72216µs45µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:72] 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] . ')' };
# 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::subtype # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as
73
74 subtype 'Str'
75 => as 'Value'
76 => where { ref(\$_) eq 'SCALAR' || ref(\(my $val = $_)) eq 'SCALAR' }
77
# spent 83µs (12+71) within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:83] which was called: # once (12µs+71µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
7818µs21µs $_[0]->parent()->_inline_check($_[1])
# spent 1µs making 1 call to Moose::Meta::TypeConstraint::parent # spent 70µs making 1 call to Moose::Meta::TypeConstraint::_inline_check, recursion: max depth 1, sum of overlapping time 70µs
79 . ' && ('
80 . 'ref(\\' . $_[1] . ') eq "SCALAR"'
81 . ' || ref(\\(my $val = ' . $_[1] . ')) eq "SCALAR"'
82 . ')'
83111µs45µs };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
84
8511µs119µs my $value_type = Moose::Util::TypeConstraints::find_type_constraint('Value');
# spent 19µ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 68µs (9+60) within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:112] which was called: # once (9µs+60µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> 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
10317µs10s 'my $val = '.$_[1].';'.
# spent 60µs making 1 call to Moose::Meta::TypeConstraint::_inline_check, recursion: max depth 1, sum of overlapping time 60µ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 ); '
112112µs46µs };
# 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::subtype # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as
113
114 subtype 'Int'
115 => as 'Num'
116 => where { (my $val = $_) =~ /\A-?[0-9]+\z/ }
117
# spent 224µs (19+205) within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:120] which was called 3 times, avg 75µs/call: # 3 times (19µs+205µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm, avg 75µs/call
=> inline_as {
118316µs30s $value_type->_inline_check($_[1])
# spent 205µs making 3 calls to Moose::Meta::TypeConstraint::_inline_check, avg 68µs/call, recursion: max depth 1, sum of overlapping time 205µs
119 . ' && (my $val = ' . $_[1] . ') =~ /\A-?[0-9]+\z/'
120110µs45µs };
# 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::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
121
122 subtype 'CodeRef'
123 => as 'Ref'
124 => where { ref($_) eq 'CODE' }
125216µs45µs
# spent 3µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:125] which was called: # once (3µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as { 'ref(' . $_[1] . ') eq "CODE"' };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
126
127 subtype 'RegexpRef'
128 => as 'Ref'
129 => where( \&_RegexpRef )
130
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:132] which was called: # once (2µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
13116µs 'Moose::Util::TypeConstraints::Builtins::_RegexpRef(' . $_[1] . ')'
13219µs45µs };
# 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::subtype # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as
133
134 subtype 'GlobRef'
135 => as 'Ref'
136 => where { ref($_) eq 'GLOB' }
137216µs45µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/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 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs 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 4µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:152] which was called: # once (4µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
14818µs '(ref(' . $_[1] . ') eq "GLOB" '
149 . '&& Scalar::Util::openhandle(' . $_[1] . ')) '
150 . '|| (Scalar::Util::blessed(' . $_[1] . ') '
151 . '&& ' . $_[1] . '->isa("IO::Handle"))'
152112µs45µs };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::subtype
153
154 subtype 'Object'
155 => as 'Ref'
156 => where { blessed($_) }
157216µs45µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:157] which was called: # once (2µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as { 'Scalar::Util::blessed(' . $_[1] . ')' };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::subtype # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as
158
159 subtype 'ClassName'
160 => as 'Str'
161 => where { is_class_loaded($_) }
162 # the long Str tests are redundant here
163323µs46µs
# spent 4µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:163] 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 { 'Class::Load::is_class_loaded(' . $_[1] . ')' };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs 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 40µs (11+29) within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:176] which was called: # once (11µs+29µs) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
=> inline_as {
17117µs21µs $_[0]->parent()->_inline_check($_[1])
# spent 1µs making 1 call to Moose::Meta::TypeConstraint::parent # spent 28µs making 1 call to Moose::Meta::TypeConstraint::_inline_check, recursion: max depth 1, sum of overlapping time 28µs
172 . ' && do {'
173 . 'my $meta = Class::MOP::class_of(' . $_[1] . ');'
174 . '$meta && $meta->isa("Moose::Meta::Role");'
175 . '}'
176111µs45µs };
# spent 2µs making 1 call to Moose::Util::TypeConstraints::Builtins::where # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::as # spent 1µs making 1 call to Moose::Util::TypeConstraints::Builtins::inline_as # spent 1µs 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 3µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:195] which was called: # once (3µs+0s) by Moose::Meta::TypeConstraint::_inline_check at line 216 of Moose/Meta/TypeConstraint.pm
inlined => sub {
19316µ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 )
204115µs3471µs );
# spent 425µs making 1 call to Moose::Meta::TypeConstraint::new # spent 24µs making 1 call to Moose::Meta::TypeConstraint::Registry::add_type_constraint # spent 23µ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 constraint_generator => sub {
214 my $type_parameter = shift;
215 my $check = $type_parameter->_compiled_type_constraint;
216 return sub {
217 foreach my $x (@$_) {
218 ( $check->($x) ) || return;
219 }
220 1;
221 }
222 },
22315µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:223] 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 "ARRAY"' },
224 inline_generator => sub {
225 my $self = shift;
226 my $type_parameter = shift;
227 my $val = shift;
228
229 'do {'
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 )
239111µs3314µs );
# spent 276µs making 1 call to Moose::Meta::TypeConstraint::new # spent 20µs making 1 call to Moose::Meta::TypeConstraint::Registry::add_type_constraint # spent 18µ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 constraint_generator => sub {
249 my $type_parameter = shift;
250 my $check = $type_parameter->_compiled_type_constraint;
251 return sub {
252 foreach my $x ( values %$_ ) {
253 ( $check->($x) ) || return;
254 }
255 1;
256 }
257 },
25815µs
# spent 2µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/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 inline_generator => sub {
260 my $self = shift;
261 my $type_parameter = shift;
262 my $val = shift;
263
264 'do {'
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 )
274110µs3334µs );
# spent 292µs making 1 call to Moose::Meta::TypeConstraint::new # spent 24µs making 1 call to Moose::Meta::TypeConstraint::Registry::add_type_constraint # spent 18µ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 },
29114µs
# spent 1µs within Moose::Util::TypeConstraints::Builtins::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Util/TypeConstraints/Builtins.pm:291] which was called: # once (1µs+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 )
300115µs3300µs );
# spent 262µs making 1 call to Moose::Meta::TypeConstraint::new # spent 20µs making 1 call to Moose::Meta::TypeConstraint::Registry::add_type_constraint # spent 18µs making 1 call to Moose::Util::TypeConstraints::find_type_constraint
301}
302
30314µs1;
304
305__END__