← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 22:00:36 2010
Reported on Wed Nov 17 22:10:08 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/UndefinedType.pm
StatementsExecuted 78 statements in 2.65ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3522384µs384µsMooseX::Types::UndefinedType::::nameMooseX::Types::UndefinedType::name
911262µs262µsMooseX::Types::UndefinedType::::newMooseX::Types::UndefinedType::new
911238µs337µsMooseX::Types::UndefinedType::::__ANON__[:16]MooseX::Types::UndefinedType::__ANON__[:16]
11179µs151µsMooseX::Types::UndefinedType::::BEGIN@10MooseX::Types::UndefinedType::BEGIN@10
88156µs56µsMooseX::Types::UndefinedType::::DESTROYMooseX::Types::UndefinedType::DESTROY
11146µs198µsMooseX::Types::UndefinedType::::BEGIN@16MooseX::Types::UndefinedType::BEGIN@16
11140µs56µsMooseX::Types::UndefinedType::::BEGIN@11MooseX::Types::UndefinedType::BEGIN@11
11136µs403µsMooseX::Types::UndefinedType::::BEGIN@14MooseX::Types::UndefinedType::BEGIN@14
11119µs19µsMooseX::Types::UndefinedType::::BEGIN@13MooseX::Types::UndefinedType::BEGIN@13
0000s0sMooseX::Types::UndefinedType::::AUTOLOADMooseX::Types::UndefinedType::AUTOLOAD
0000s0sMooseX::Types::UndefinedType::::__autovivifyMooseX::Types::UndefinedType::__autovivify
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package MooseX::Types::UndefinedType;
215µsour $VERSION = "0.23";
3
4=head1 NAME
5
- -
103109µs2223µs
# spent 151µs (79+72) within MooseX::Types::UndefinedType::BEGIN@10 which was called: # once (79µs+72µs) by MooseX::Types::BEGIN@14 at line 10
use warnings;
# spent 151µs making 1 call to MooseX::Types::UndefinedType::BEGIN@10 # spent 72µs making 1 call to warnings::import
11395µs272µs
# spent 56µs (40+16) within MooseX::Types::UndefinedType::BEGIN@11 which was called: # once (40µs+16µs) by MooseX::Types::BEGIN@14 at line 11
use strict;
# spent 56µs making 1 call to MooseX::Types::UndefinedType::BEGIN@11 # spent 16µs making 1 call to strict::import
12
13393µs119µs
# spent 19µs within MooseX::Types::UndefinedType::BEGIN@13 which was called: # once (19µs+0s) by MooseX::Types::BEGIN@14 at line 13
use Moose::Util::TypeConstraints ();
# spent 19µs making 1 call to MooseX::Types::UndefinedType::BEGIN@13
143195µs2771µs
# spent 403µs (36+367) within MooseX::Types::UndefinedType::BEGIN@14 which was called: # once (36µs+367µs) by MooseX::Types::BEGIN@14 at line 14
use Carp::Clan qw( ^MooseX::Types );
# spent 403µs making 1 call to MooseX::Types::UndefinedType::BEGIN@14 # spent 367µs making 1 call to Carp::Clan::import
15
169186µs999µs
# spent 337µs (238+99) 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 37µs/call: # 9 times (238µs+99µs) by MooseX::Types::TypeDecorator::new at line 76 of MooseX/Types/TypeDecorator.pm, avg 37µs/call # spent 198µs (46+152) within MooseX::Types::UndefinedType::BEGIN@16 which was called: # once (46µs+152µs) by MooseX::Types::BEGIN@14 at line 17
use overload '""' => sub { shift->name },
# spent 99µs making 9 calls to MooseX::Types::UndefinedType::name, avg 11µs/call
173955µs2349µs fallback => 1;
# spent 198µs making 1 call to MooseX::Types::UndefinedType::BEGIN@16 # spent 152µs making 1 call to overload::import
18
19=head1 DESCRIPTION
20
- -
38
# spent 262µs within MooseX::Types::UndefinedType::new which was called 9 times, avg 29µs/call: # 9 times (262µ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 29µs/call
sub new {
399337µs return bless { name => $_[1] }, $_[0];
40}
41
42=head2 name
43
- -
48
# spent 384µs within MooseX::Types::UndefinedType::name which was called 35 times, avg 11µs/call: # 26 times (285µ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 11µs/call # 9 times (99µ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 11µs/call
sub name {
4935545µs return $_[0]->{name};
50}
51
52=head2 __autovivify
53
- -
58sub __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
- -
76sub 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 56µs within MooseX::Types::UndefinedType::DESTROY which was called 8 times, avg 7µs/call: # once (9µs+0s) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 45 of Markdent/Types/Internal.pm # once (7µs+0s) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 33 of Markdent/Types/Internal.pm # once (7µs+0s) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 49 of Markdent/Types/Internal.pm # once (7µs+0s) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 57 of Markdent/Types/Internal.pm # once (7µs+0s) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 41 of Markdent/Types/Internal.pm # once (7µs+0s) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 59 of Markdent/Types/Internal.pm # once (7µs+0s) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 66 of Markdent/Types/Internal.pm # once (7µs+0s) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 37 of Markdent/Types/Internal.pm
sub DESTROY {
958118µs return;
96}
97
98=head1 SEE ALSO
99
- -
117111µs1;