← 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:12 2010

Filename/home/doy/nytprof/markdent/accessor _native_type defined at /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Attribute/Native/Trait.pm
StatementsExecuted 113 statements in 1.36ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sClass::MOP::Method::Generated::::__ANON__[accessor _native_type defined at Moose/Meta/Attribute/Native/Trait.pm:200]Class::MOP::Method::Generated::__ANON__[accessor _native_type defined at Moose/Meta/Attribute/Native/Trait.pm:200]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1my $type_constraint = ${$__captures->{'$type_constraint'}};
2my $type_constraint_obj = ${$__captures->{'$type_constraint_obj'}};
3my $meta = ${$__captures->{'$meta'}};
4my $attr = ${$__captures->{'$attr'}};
5#line 190 "accessor _native_type defined at /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Attribute/Native/Trait.pm"
6sub {$meta->throw_error("Cannot assign a value to a read-only accessor", data => \@_) if @_ > 1;unless (exists $_[0]->{"_native_type"}) {
7 my $default;
8 if(my $builder = $_[0]->can($attr->builder)){
9 $default = $_[0]->$builder;
10 } else {
11 $meta->throw_error(sprintf "%s does not support builder method '%s' for attribute '%s'", ref($_[0]) || $_[0], $attr->builder, $attr->name);
12 }
13$type_constraint->($default) || $meta->throw_error("Attribute (_native_type) does not pass the type constraint because: " . $type_constraint_obj->get_message($default), data => $default);
14 $_[0]->{"_native_type"} = $default;
15}
16return $_[0]->{"_native_type"};}
17;
18
- -
1901081.20ms
- -
192183.07ms
# spent 2.96ms making 6 calls to Moose::Meta::Attribute::Native::Trait::_build_native_type, avg 493µs/call # spent 69µs making 6 calls to Class::MOP::Mixin::AttributeCore::builder, avg 11µs/call # spent 46µs making 6 calls to UNIVERSAL::can, avg 8µs/call
- -
1976102µs
# spent 102µs making 6 calls to Moose::Util::TypeConstraints::OptimizedConstraints::Str, avg 17µs/call
- -
2015156µs