← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:45:08 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/x86_64-linux/Moose/Meta/Attribute/Native.pm
StatementsExecuted 44 statements in 702µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sMoose::Meta::Attribute::Native::::__ANON__[:26]Moose::Meta::Attribute::Native::__ANON__[:26]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Meta::Attribute::Native;
2
315µsour $VERSION = '1.19';
4160µs$VERSION = eval $VERSION;
# spent 12µs executing statements in string eval
513µsour $AUTHORITY = 'cpan:STEVAN';
6
7110µsmy @trait_names = qw(Bool Counter Number String Array Hash Code);
8
917µsfor my $trait_name (@trait_names) {
10738µs my $trait_class = "Moose::Meta::Attribute::Native::Trait::$trait_name";
117110µs74.14ms my $meta = Class::MOP::Class->initialize(
# spent 4.14ms making 7 calls to Class::MOP::Class::initialize, avg 591µs/call
12 "Moose::Meta::Attribute::Custom::Trait::$trait_name"
13 );
14788µs73.09ms if ($meta->find_method_by_name('register_implementation')) {
# spent 3.09ms making 7 calls to Class::MOP::Class::find_method_by_name, avg 442µs/call
15 my $class = $meta->name->register_implementation;
16 Moose->throw_error(
17 "An implementation for $trait_name already exists " .
18 "(found '$class' when trying to register '$trait_class')"
19 );
20 }
21 $meta->add_method(register_implementation => sub {
22 # resolve_metatrait_alias will load classes anyway, but throws away
23 # their error message; we WANT to die if there's a problem
2410145µs53.34s Class::MOP::load_class($trait_class);
# spent 3.34s making 5 calls to Class::MOP::load_class, avg 669ms/call
25 return $trait_class;
267191µs73.25ms });
# spent 3.25ms making 7 calls to Class::MOP::Mixin::HasMethods::add_method, avg 464µs/call
27}
28
29146µs1;
30
31__END__