| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/UndefinedType.pm |
| Statements | Executed 78 statements in 2.63ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 35 | 2 | 2 | 438µs | 438µs | MooseX::Types::UndefinedType::name |
| 9 | 1 | 1 | 240µs | 240µs | MooseX::Types::UndefinedType::new |
| 9 | 1 | 1 | 208µs | 295µs | MooseX::Types::UndefinedType::__ANON__[:16] |
| 1 | 1 | 1 | 77µs | 149µs | MooseX::Types::UndefinedType::BEGIN@10 |
| 8 | 8 | 1 | 57µs | 57µs | MooseX::Types::UndefinedType::DESTROY |
| 1 | 1 | 1 | 47µs | 273µs | MooseX::Types::UndefinedType::BEGIN@16 |
| 1 | 1 | 1 | 41µs | 56µs | MooseX::Types::UndefinedType::BEGIN@11 |
| 1 | 1 | 1 | 36µs | 382µs | MooseX::Types::UndefinedType::BEGIN@14 |
| 1 | 1 | 1 | 24µs | 24µs | MooseX::Types::UndefinedType::BEGIN@13 |
| 0 | 0 | 0 | 0s | 0s | MooseX::Types::UndefinedType::AUTOLOAD |
| 0 | 0 | 0 | 0s | 0s | MooseX::Types::UndefinedType::__autovivify |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package MooseX::Types::UndefinedType; | ||||
| 2 | 1 | 5µs | our $VERSION = "0.23"; | ||
| 3 | |||||
| 4 | =head1 NAME | ||||
| 5 | |||||
| - - | |||||
| 10 | 3 | 110µs | 2 | 222µs | # spent 149µs (77+72) within MooseX::Types::UndefinedType::BEGIN@10 which was called:
# once (77µs+72µs) by MooseX::Types::BEGIN@14 at line 10 # spent 149µs making 1 call to MooseX::Types::UndefinedType::BEGIN@10
# spent 72µs making 1 call to warnings::import |
| 11 | 3 | 97µs | 2 | 72µs | # spent 56µs (41+15) within MooseX::Types::UndefinedType::BEGIN@11 which was called:
# once (41µs+15µs) by MooseX::Types::BEGIN@14 at line 11 # spent 56µs making 1 call to MooseX::Types::UndefinedType::BEGIN@11
# spent 15µs making 1 call to strict::import |
| 12 | |||||
| 13 | 3 | 110µs | 1 | 24µs | # spent 24µs within MooseX::Types::UndefinedType::BEGIN@13 which was called:
# once (24µs+0s) by MooseX::Types::BEGIN@14 at line 13 # spent 24µs making 1 call to MooseX::Types::UndefinedType::BEGIN@13 |
| 14 | 3 | 212µs | 2 | 727µs | # spent 382µs (36+346) within MooseX::Types::UndefinedType::BEGIN@14 which was called:
# once (36µs+346µs) by MooseX::Types::BEGIN@14 at line 14 # spent 382µs making 1 call to MooseX::Types::UndefinedType::BEGIN@14
# spent 346µs making 1 call to Carp::Clan::import |
| 15 | |||||
| 16 | 9 | 172µs | 9 | 87µs | # spent 295µs (208+87) within MooseX::Types::UndefinedType::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/UndefinedType.pm:16] which was called 9 times, avg 33µs/call:
# 9 times (208µs+87µs) by MooseX::Types::TypeDecorator::new at line 76 of MooseX/Types/TypeDecorator.pm, avg 33µs/call
# spent 273µs (47+226) within MooseX::Types::UndefinedType::BEGIN@16 which was called:
# once (47µs+226µs) by MooseX::Types::BEGIN@14 at line 17 # spent 87µs making 9 calls to MooseX::Types::UndefinedType::name, avg 10µs/call |
| 17 | 3 | 864µs | 2 | 499µs | fallback => 1; # spent 273µs making 1 call to MooseX::Types::UndefinedType::BEGIN@16
# spent 226µs making 1 call to overload::import |
| 18 | |||||
| 19 | =head1 DESCRIPTION | ||||
| 20 | |||||
| - - | |||||
| 38 | # spent 240µs within MooseX::Types::UndefinedType::new which was called 9 times, avg 27µs/call:
# 9 times (240µs+0s) by __TYPE__::Markdent::Types::Internal::BlockParserClass or __TYPE__::Markdent::Types::Internal::EventObject or __TYPE__::Markdent::Types::Internal::HandlerObject or __TYPE__::Markdent::Types::Internal::HeaderLevel or __TYPE__::Markdent::Types::Internal::NonEmptyArrayRef or __TYPE__::Markdent::Types::Internal::OutputStream or __TYPE__::Markdent::Types::Internal::PosInt or __TYPE__::Markdent::Types::Internal::SpanParserClass or __TYPE__::Markdent::Types::Internal::TableCellAlignment at line 403 of MooseX/Types.pm, avg 27µs/call | ||||
| 39 | 9 | 320µs | return bless { name => $_[1] }, $_[0]; | ||
| 40 | } | ||||
| 41 | |||||
| 42 | =head2 name | ||||
| 43 | |||||
| - - | |||||
| 48 | # spent 438µs within MooseX::Types::UndefinedType::name which was called 35 times, avg 13µs/call:
# 26 times (351µs+0s) 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 of MooseX/Types/TypeDecorator.pm, avg 14µs/call
# 9 times (87µs+0s) by MooseX::Types::UndefinedType::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/UndefinedType.pm:16] at line 16, avg 10µs/call | ||||
| 49 | 35 | 605µs | return $_[0]->{name}; | ||
| 50 | } | ||||
| 51 | |||||
| 52 | =head2 __autovivify | ||||
| 53 | |||||
| - - | |||||
| 58 | sub __autovivify { | ||||
| 59 | my ($self) = @_; | ||||
| 60 | if(my $tc = $self->{instance}) { | ||||
| 61 | return $tc; | ||||
| 62 | } elsif( my $new_tc = Moose::Util::TypeConstraints::find_type_constraint($self->name)) { | ||||
| 63 | $self->{instance} = $new_tc; | ||||
| 64 | return $new_tc; | ||||
| 65 | } else { | ||||
| 66 | return; | ||||
| 67 | } | ||||
| 68 | } | ||||
| 69 | |||||
| 70 | =head2 AUTOLOAD | ||||
| 71 | |||||
| - - | |||||
| 76 | sub AUTOLOAD { | ||||
| 77 | my ($self, @args) = @_; | ||||
| 78 | my ($method) = our $AUTOLOAD =~ /([^:]+)$/; | ||||
| 79 | |||||
| 80 | if(my $type_constraint = $self->__autovivify) { | ||||
| 81 | return $type_constraint->$method(@args); | ||||
| 82 | } else { | ||||
| 83 | croak "Method '$method' is not supported for " . $self->name; | ||||
| 84 | } | ||||
| 85 | } | ||||
| 86 | |||||
| 87 | =head2 DESTROY | ||||
| 88 | |||||
| - - | |||||
| 94 | # spent 57µs within MooseX::Types::UndefinedType::DESTROY which was called 8 times, avg 7µs/call:
# once (8µ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
# once (7µ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
# once (7µ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
# once (7µ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
# once (7µ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
# once (7µ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
# once (7µ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
# once (7µ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 | ||||
| 95 | 8 | 120µs | return; | ||
| 96 | } | ||||
| 97 | |||||
| 98 | =head1 SEE ALSO | ||||
| 99 | |||||
| - - | |||||
| 117 | 1 | 11µs | 1; |