| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/TypeDecorator.pm |
| Statements | Executed 3290 statements in 49.6ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 198 | 12 | 8 | 14.4ms | 41.7ms | MooseX::Types::TypeDecorator::AUTOLOAD |
| 323 | 4 | 1 | 9.35ms | 11.3ms | MooseX::Types::TypeDecorator::__type_constraint |
| 198 | 1 | 1 | 5.26ms | 5.26ms | MooseX::Types::TypeDecorator::CORE:match (opcode) |
| 1 | 1 | 1 | 5.05ms | 6.07ms | MooseX::Types::TypeDecorator::BEGIN@8 |
| 68 | 1 | 1 | 4.38ms | 6.22ms | MooseX::Types::TypeDecorator::new |
| 83 | 6 | 5 | 3.98ms | 7.74ms | MooseX::Types::TypeDecorator::isa |
| 38 | 6 | 3 | 1.87ms | 3.86ms | MooseX::Types::TypeDecorator::__ANON__[:26] |
| 119 | 9 | 4 | 1.14ms | 1.14ms | MooseX::Types::TypeDecorator::__ANON__[:27] |
| 4 | 1 | 1 | 205µs | 381µs | MooseX::Types::TypeDecorator::can |
| 16 | 8 | 1 | 116µs | 116µs | MooseX::Types::TypeDecorator::DESTROY |
| 1 | 1 | 1 | 81µs | 100µs | MooseX::Types::TypeDecorator::BEGIN@4 |
| 1 | 1 | 1 | 63µs | 288µs | MooseX::Types::TypeDecorator::BEGIN@13 |
| 1 | 1 | 1 | 41µs | 41µs | MooseX::Types::TypeDecorator::BEGIN@10 |
| 1 | 1 | 1 | 38µs | 208µs | MooseX::Types::TypeDecorator::BEGIN@11 |
| 1 | 1 | 1 | 38µs | 108µs | MooseX::Types::TypeDecorator::BEGIN@5 |
| 1 | 1 | 1 | 22µs | 22µs | MooseX::Types::TypeDecorator::BEGIN@9 |
| 0 | 0 | 0 | 0s | 0s | MooseX::Types::TypeDecorator::__ANON__[:18] |
| 0 | 0 | 0 | 0s | 0s | MooseX::Types::TypeDecorator::__ANON__[:50] |
| 0 | 0 | 0 | 0s | 0s | MooseX::Types::TypeDecorator::_throw_error |
| 0 | 0 | 0 | 0s | 0s | MooseX::Types::TypeDecorator::meta |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package MooseX::Types::TypeDecorator; | ||||
| 2 | 1 | 6µs | our $VERSION = "0.23"; | ||
| 3 | |||||
| 4 | 3 | 103µs | 2 | 120µs | # spent 100µs (81+19) within MooseX::Types::TypeDecorator::BEGIN@4 which was called:
# once (81µs+19µs) by MooseX::Types::BEGIN@11 at line 4 # spent 100µs making 1 call to MooseX::Types::TypeDecorator::BEGIN@4
# spent 19µs making 1 call to strict::import |
| 5 | 3 | 106µs | 2 | 178µs | # spent 108µs (38+70) within MooseX::Types::TypeDecorator::BEGIN@5 which was called:
# once (38µs+70µs) by MooseX::Types::BEGIN@11 at line 5 # spent 108µs making 1 call to MooseX::Types::TypeDecorator::BEGIN@5
# spent 70µs making 1 call to warnings::import |
| 6 | |||||
| 7 | |||||
| 8 | 3 | 558µs | 2 | 6.46ms | # spent 6.07ms (5.05+1.02) within MooseX::Types::TypeDecorator::BEGIN@8 which was called:
# once (5.05ms+1.02ms) by MooseX::Types::BEGIN@11 at line 8 # spent 6.07ms making 1 call to MooseX::Types::TypeDecorator::BEGIN@8
# spent 391µs making 1 call to Carp::Clan::import |
| 9 | 3 | 84µs | 1 | 22µs | # spent 22µs within MooseX::Types::TypeDecorator::BEGIN@9 which was called:
# once (22µs+0s) by MooseX::Types::BEGIN@11 at line 9 # spent 22µs making 1 call to MooseX::Types::TypeDecorator::BEGIN@9 |
| 10 | 3 | 113µs | 1 | 41µs | # spent 41µs within MooseX::Types::TypeDecorator::BEGIN@10 which was called:
# once (41µs+0s) by MooseX::Types::BEGIN@11 at line 10 # spent 41µs making 1 call to MooseX::Types::TypeDecorator::BEGIN@10 |
| 11 | 3 | 984µs | 2 | 379µs | # spent 208µs (38+170) within MooseX::Types::TypeDecorator::BEGIN@11 which was called:
# once (38µs+170µs) by MooseX::Types::BEGIN@11 at line 11 # spent 208µs making 1 call to MooseX::Types::TypeDecorator::BEGIN@11
# spent 170µs making 1 call to Exporter::import |
| 12 | |||||
| 13 | # spent 288µs (63+225) within MooseX::Types::TypeDecorator::BEGIN@13 which was called:
# once (63µs+225µs) by MooseX::Types::BEGIN@11 at line 53 | ||||
| 14 | '0+' => sub { | ||||
| 15 | my $self = shift @_; | ||||
| 16 | my $tc = $self->{__type_constraint}; | ||||
| 17 | return 0+$tc; | ||||
| 18 | }, | ||||
| 19 | # spent 3.86ms (1.87+1.99) within MooseX::Types::TypeDecorator::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/TypeDecorator.pm:26] which was called 38 times, avg 102µs/call:
# 12 times (666µs+733µs) by Moose::Util::TypeConstraints::CORE:subst at line 238 of Moose/Util/TypeConstraints.pm, avg 117µs/call
# 8 times (423µs+404µs) by Moose::Meta::TypeConstraint::Registry::get_type_constraint at line 41 of Moose/Meta/TypeConstraint/Registry.pm, avg 103µs/call
# 8 times (340µs+404µs) by Moose::Util::TypeConstraints::CORE:match at line 532 of Moose/Util/TypeConstraints.pm, avg 93µs/call
# 8 times (348µs+352µs) by Moose::Meta::TypeConstraint::new at line 68 of Moose/Meta/TypeConstraint.pm, avg 88µs/call
# once (54µs+52µs) by Sub::Name::subname at line 274 of Moose/Meta/TypeConstraint.pm
# once (44µs+45µs) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 52 of Moose/Meta/TypeConstraint/Registry.pm | ||||
| 20 | 76 | 1.85ms | my $self = shift @_; | ||
| 21 | 114 | 1.99ms | if(blessed $self) { # spent 1.25ms making 38 calls to MooseX::Types::TypeDecorator::__type_constraint, avg 33µs/call
# spent 351µs making 26 calls to MooseX::Types::UndefinedType::name, avg 14µs/call
# spent 202µs making 38 calls to Scalar::Util::blessed, avg 5µs/call
# spent 187µs making 12 calls to Moose::Meta::TypeConstraint::name, avg 16µs/call | ||
| 22 | return $self->__type_constraint->name; | ||||
| 23 | } else { | ||||
| 24 | return "$self"; | ||||
| 25 | } | ||||
| 26 | }, | ||||
| 27 | 119 | 1.73ms | # spent 1.14ms within MooseX::Types::TypeDecorator::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/TypeDecorator.pm:27] which was called 119 times, avg 10µs/call:
# 70 times (721µs+0s) by Moose::Meta::Method::Accessor::_eval_environment at line 41 of Moose/Meta/Method/Accessor.pm, avg 10µs/call
# 12 times (101µs+0s) by Moose::Util::TypeConstraints::find_or_parse_type_constraint at line 218 of Moose/Util/TypeConstraints.pm, avg 8µs/call
# 8 times (92µs+0s) by Moose::Meta::TypeConstraint::new at line 68 of Moose/Meta/TypeConstraint.pm, avg 12µs/call
# 8 times (61µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 547 of Moose/Util/TypeConstraints.pm, avg 8µs/call
# 6 times (45µs+0s) by Moose::Util::TypeConstraints::find_or_create_isa_type_constraint at line 204 of Moose/Util/TypeConstraints.pm, avg 7µs/call
# 6 times (43µs+0s) by Moose::Util::TypeConstraints::find_or_create_type_constraint at line 176 of Moose/Util/TypeConstraints.pm, avg 7µs/call
# 4 times (33µs+0s) by Moose::Meta::Method::Accessor::Native::Collection::_tc_member_type at line 40 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 8µs/call
# 4 times (32µs+0s) by Class::MOP::Class:::around at line 138 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 8µs/call
# once (8µs+0s) by Moose::Util::TypeConstraints::create_enum_type_constraint at line 460 of Moose/Util/TypeConstraints.pm | ||
| 28 | '|' => sub { | ||||
| 29 | |||||
| 30 | ## It's kind of ugly that we need to know about Union Types, but this | ||||
| 31 | ## is needed for syntax compatibility. Maybe someday we'll all just do | ||||
| 32 | ## Or[Str,Str,Int] | ||||
| 33 | |||||
| 34 | my @args = @_[0,1]; ## arg 3 is special, see the overload docs. | ||||
| 35 | my @tc = grep {blessed $_} map { | ||||
| 36 | blessed $_ ? $_ : | ||||
| 37 | Moose::Util::TypeConstraints::find_or_parse_type_constraint($_) | ||||
| 38 | || __PACKAGE__->_throw_error( "$_ is not a type constraint") | ||||
| 39 | } @args; | ||||
| 40 | |||||
| 41 | ( scalar @tc == scalar @args) | ||||
| 42 | || __PACKAGE__->_throw_error( | ||||
| 43 | "one of your type constraints is bad. Passed: ". join(', ', @args) ." Got: ". join(', ', @tc)); | ||||
| 44 | |||||
| 45 | ( scalar @tc >= 2 ) | ||||
| 46 | || __PACKAGE__->_throw_error("You must pass in at least 2 type names to make a union"); | ||||
| 47 | |||||
| 48 | my $union = Moose::Meta::TypeConstraint::Union->new(type_constraints=>\@tc); | ||||
| 49 | return Moose::Util::TypeConstraints::register_type_constraint($union); | ||||
| 50 | }, | ||||
| 51 | 1 | 225µs | fallback => 1, # spent 225µs making 1 call to overload::import | ||
| 52 | |||||
| 53 | 3 | 1.83ms | 1 | 288µs | ); # spent 288µs making 1 call to MooseX::Types::TypeDecorator::BEGIN@13 |
| 54 | |||||
| 55 | =head1 NAME | ||||
| 56 | |||||
| - - | |||||
| 74 | # spent 6.22ms (4.38+1.84) within MooseX::Types::TypeDecorator::new which was called 68 times, avg 91µs/call:
# 68 times (4.38ms+1.84ms) by MooseX::Types::create_type_decorator at line 464 of MooseX/Types.pm, avg 91µs/call | ||||
| 75 | 136 | 1.01ms | my $class = shift @_; | ||
| 76 | 68 | 4.30ms | 68 | 827µs | if(my $arg = shift @_) { # spent 532µs making 59 calls to Moose::Meta::TypeConstraint::__ANON__[Moose/Meta/TypeConstraint.pm:10], avg 9µs/call
# spent 295µs making 9 calls to MooseX::Types::UndefinedType::__ANON__[MooseX/Types/UndefinedType.pm:16], avg 33µs/call |
| 77 | 154 | 1.01ms | if(blessed $arg && $arg->isa('Moose::Meta::TypeConstraint')) { # spent 542µs making 77 calls to UNIVERSAL::isa, avg 7µs/call
# spent 473µs making 77 calls to Scalar::Util::blessed, avg 6µs/call | ||
| 78 | return bless {'__type_constraint'=>$arg}, $class; | ||||
| 79 | } elsif( | ||||
| 80 | blessed $arg && | ||||
| 81 | $arg->isa('MooseX::Types::UndefinedType') | ||||
| 82 | ) { | ||||
| 83 | ## stub in case we'll need to handle these types differently | ||||
| 84 | return bless {'__type_constraint'=>$arg}, $class; | ||||
| 85 | } elsif(blessed $arg) { | ||||
| 86 | __PACKAGE__->_throw_error("Argument must be ->isa('Moose::Meta::TypeConstraint') or ->isa('MooseX::Types::UndefinedType'), not ". blessed $arg); | ||||
| 87 | } else { | ||||
| 88 | __PACKAGE__->_throw_error("Argument cannot be '$arg'"); | ||||
| 89 | } | ||||
| 90 | } else { | ||||
| 91 | __PACKAGE__->_throw_error("This method [new] requires a single argument."); | ||||
| 92 | } | ||||
| 93 | } | ||||
| 94 | |||||
| 95 | =head2 __type_constraint ($type_constraint) | ||||
| 96 | |||||
| - - | |||||
| 101 | # spent 11.3ms (9.35+1.97) within MooseX::Types::TypeDecorator::__type_constraint which was called 323 times, avg 35µs/call:
# 198 times (5.91ms+1.35ms) by MooseX::Types::TypeDecorator::AUTOLOAD at line 206, avg 37µs/call
# 83 times (2.27ms+414µs) by MooseX::Types::TypeDecorator::isa at line 121, avg 32µs/call
# 38 times (1.07ms+182µs) by MooseX::Types::TypeDecorator::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/TypeDecorator.pm:26] at line 21, avg 33µs/call
# 4 times (99µs+20µs) by MooseX::Types::TypeDecorator::can at line 141, avg 30µs/call | ||||
| 102 | 646 | 6.69ms | my $self = shift @_; | ||
| 103 | 646 | 6.02ms | 323 | 1.97ms | if(blessed $self) { # spent 1.97ms making 323 calls to Scalar::Util::blessed, avg 6µs/call |
| 104 | if(defined(my $tc = shift @_)) { | ||||
| 105 | $self->{__type_constraint} = $tc; | ||||
| 106 | } | ||||
| 107 | return $self->{__type_constraint}; | ||||
| 108 | } else { | ||||
| 109 | __PACKAGE__->_throw_error('cannot call __type_constraint as a class method'); | ||||
| 110 | } | ||||
| 111 | } | ||||
| 112 | |||||
| 113 | =head2 isa | ||||
| 114 | |||||
| - - | |||||
| 119 | # spent 7.74ms (3.98+3.76) within MooseX::Types::TypeDecorator::isa which was called 83 times, avg 93µs/call:
# 44 times (2.19ms+2.09ms) by Moose::Meta::Attribute::_process_isa_option at line 320 of Moose/Meta/Attribute.pm, avg 97µs/call
# 12 times (591µs+528µs) by Moose::Meta::Method::Accessor::Native::Collection::_check_new_members_only at line 96 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 93µs/call
# 12 times (534µs+493µs) by Moose::Util::TypeConstraints::find_type_constraint at line 256 of Moose/Util/TypeConstraints.pm, avg 86µs/call
# 6 times (272µs+267µs) by Moose::Meta::TypeConstraint::Parameterized::compile_type_constraint at line 46 of Moose/Meta/TypeConstraint/Parameterized.pm, avg 90µs/call
# 6 times (243µs+242µs) by Moose::Meta::TypeConstraint::Parameterizable::parameterize at line 67 of Moose/Meta/TypeConstraint/Parameterizable.pm, avg 81µs/call
# 3 times (152µs+144µs) by Moose::Meta::Attribute::_process_does_option at line 337 of Moose/Meta/Attribute.pm, avg 99µs/call | ||||
| 120 | 166 | 4.93ms | my ($self, $target) = @_; | ||
| 121 | 249 | 3.76ms | if(defined $target) { # spent 2.68ms making 83 calls to MooseX::Types::TypeDecorator::__type_constraint, avg 32µs/call
# spent 632µs making 83 calls to UNIVERSAL::isa, avg 8µs/call
# spent 451µs making 83 calls to Scalar::Util::blessed, avg 5µs/call | ||
| 122 | if(blessed $self) { | ||||
| 123 | return $self->__type_constraint->isa($target); | ||||
| 124 | } else { | ||||
| 125 | return; | ||||
| 126 | } | ||||
| 127 | } else { | ||||
| 128 | return; | ||||
| 129 | } | ||||
| 130 | } | ||||
| 131 | |||||
| 132 | |||||
| 133 | =head2 can | ||||
| 134 | |||||
| - - | |||||
| 139 | # spent 381µs (205+176) within MooseX::Types::TypeDecorator::can which was called 4 times, avg 95µs/call:
# 4 times (205µs+176µs) by Moose::Meta::Method::Accessor::Native::Collection::_tc_member_type at line 40 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 95µs/call | ||||
| 140 | 8 | 272µs | my ($self, $target) = @_; | ||
| 141 | 12 | 176µs | if(defined $target) { # spent 119µs making 4 calls to MooseX::Types::TypeDecorator::__type_constraint, avg 30µs/call
# spent 33µs making 4 calls to UNIVERSAL::can, avg 8µs/call
# spent 23µs making 4 calls to Scalar::Util::blessed, avg 6µs/call | ||
| 142 | if(blessed $self) { | ||||
| 143 | return $self->__type_constraint->can($target); | ||||
| 144 | } else { | ||||
| 145 | return; | ||||
| 146 | } | ||||
| 147 | } else { | ||||
| 148 | return; | ||||
| 149 | } | ||||
| 150 | } | ||||
| 151 | |||||
| 152 | =head2 meta | ||||
| 153 | |||||
| - - | |||||
| 158 | sub meta { | ||||
| 159 | my $self = shift @_; | ||||
| 160 | if(blessed $self) { | ||||
| 161 | return $self->__type_constraint->meta; | ||||
| 162 | } | ||||
| 163 | } | ||||
| 164 | |||||
| 165 | =head2 _throw_error | ||||
| 166 | |||||
| - - | |||||
| 171 | sub _throw_error { | ||||
| 172 | shift; | ||||
| 173 | require Moose; | ||||
| 174 | unshift @_, 'Moose'; | ||||
| 175 | goto &Moose::throw_error; | ||||
| 176 | } | ||||
| 177 | |||||
| 178 | =head2 DESTROY | ||||
| 179 | |||||
| - - | |||||
| 184 | # spent 116µs within MooseX::Types::TypeDecorator::DESTROY which was called 16 times, avg 7µs/call:
# 2 times (15µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 33 of Markdent/Types/Internal.pm, avg 8µs/call
# 2 times (15µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 66 of Markdent/Types/Internal.pm, avg 7µs/call
# 2 times (15µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 45 of Markdent/Types/Internal.pm, avg 7µs/call
# 2 times (14µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 41 of Markdent/Types/Internal.pm, avg 7µs/call
# 2 times (14µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 59 of Markdent/Types/Internal.pm, avg 7µs/call
# 2 times (14µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 49 of Markdent/Types/Internal.pm, avg 7µs/call
# 2 times (14µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 37 of Markdent/Types/Internal.pm, avg 7µs/call
# 2 times (14µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 57 of Markdent/Types/Internal.pm, avg 7µs/call | ||||
| 185 | 16 | 220µs | return; | ||
| 186 | } | ||||
| 187 | |||||
| 188 | =head2 AUTOLOAD | ||||
| 189 | |||||
| - - | |||||
| 194 | # spent 41.7ms (14.4+27.3) within MooseX::Types::TypeDecorator::AUTOLOAD which was called 198 times, avg 210µs/call:
# 70 times (5.23ms+5.93ms) by Moose::Meta::Method::Accessor::_eval_environment at line 41 of Moose/Meta/Method/Accessor.pm, avg 159µs/call
# 46 times (3.16ms+3.45ms) by Moose::Meta::Method::Constructor::_initialize_body at line 95 of Moose/Meta/Method/Constructor.pm, avg 144µs/call
# 30 times (2.18ms+2.42ms) by Moose::Meta::Method::Accessor::Native::Writer::_is_root_type at line 108 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 153µs/call
# 12 times (774µs+796µs) by Moose::Meta::Method::Accessor::Native::Collection::_check_new_members_only at line 96 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 131µs/call
# 8 times (652µs+7.97ms) by Moose::Util::TypeConstraints::_create_type_constraint at line 547 of Moose/Util/TypeConstraints.pm, avg 1.08ms/call
# 6 times (428µs+3.84ms) by Moose::Meta::Attribute::Native::Trait::_check_helper_type at line 96 of Moose/Meta/Attribute/Native/Trait.pm, avg 711µs/call
# 6 times (569µs+1.48ms) by Moose::Meta::Attribute::verify_against_type_constraint at line 896 of Moose/Meta/Attribute.pm, avg 342µs/call
# 6 times (419µs+422µs) by Moose::Meta::TypeConstraint::Parameterizable::parameterize at line 68 of Moose/Meta/TypeConstraint/Parameterizable.pm, avg 140µs/call
# 4 times (278µs+298µs) by Moose::Util::TypeConstraints::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Util/TypeConstraints.pm:807] at line 800 of Moose/Util/TypeConstraints.pm, avg 144µs/call
# 4 times (287µs+257µs) by Moose::Meta::Method::Accessor::Native::Collection::_tc_member_type at line 40 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 136µs/call
# 4 times (250µs+279µs) by Class::MOP::Class:::around at line 142 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 132µs/call
# 2 times (151µs+152µs) by Moose::Util::TypeConstraints::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Util/TypeConstraints.pm:828] at line 821 of Moose/Util/TypeConstraints.pm, avg 152µs/call | ||||
| 195 | |||||
| 196 | 990 | 10.9ms | my ($self, @args) = @_; | ||
| 197 | 198 | 5.26ms | my ($method) = (our $AUTOLOAD =~ /([^:]+)$/); # spent 5.26ms making 198 calls to MooseX::Types::TypeDecorator::CORE:match, avg 27µs/call | ||
| 198 | |||||
| 199 | ## We delegate with this method in an attempt to support a value of | ||||
| 200 | ## __type_constraint which is also AUTOLOADing, in particular the class | ||||
| 201 | ## MooseX::Types::UndefinedType which AUTOLOADs during autovivication. | ||||
| 202 | |||||
| 203 | my $return; | ||||
| 204 | |||||
| 205 | 198 | 5.15ms | eval { | ||
| 206 | 396 | 22.0ms | $return = $self->__type_constraint->$method(@args); # spent 7.52ms making 8 calls to Moose::Meta::TypeConstraint::create_child_type, avg 940µs/call
# spent 7.27ms making 198 calls to MooseX::Types::TypeDecorator::__type_constraint, avg 37µs/call
# spent 3.49ms making 6 calls to Moose::Meta::TypeConstraint::is_a_type_of, avg 582µs/call
# spent 1.90ms making 126 calls to Moose::Meta::TypeConstraint::_compiled_type_constraint, avg 15µs/call
# spent 1.10ms making 6 calls to Moose::Meta::TypeConstraint::check, avg 183µs/call
# spent 530µs making 36 calls to Moose::Meta::TypeConstraint::name, avg 15µs/call
# spent 163µs making 12 calls to Moose::Meta::TypeConstraint::parent, avg 14µs/call
# spent 56µs making 4 calls to Moose::Meta::TypeConstraint::Parameterized::type_parameter, avg 14µs/call | ||
| 207 | 198 | 2.70ms | }; if($@) { | ||
| 208 | __PACKAGE__->_throw_error($@); | ||||
| 209 | } else { | ||||
| 210 | return $return; | ||||
| 211 | } | ||||
| 212 | } | ||||
| 213 | |||||
| 214 | =head1 AUTHOR | ||||
| 215 | |||||
| - - | |||||
| 225 | 1 | 12µs | 1; | ||
# spent 5.26ms within MooseX::Types::TypeDecorator::CORE:match which was called 198 times, avg 27µs/call:
# 198 times (5.26ms+0s) by MooseX::Types::TypeDecorator::AUTOLOAD at line 197, avg 27µs/call |