| Filename | /home/doy/nytprof/markdent/accessor role_generator defined at /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm |
| Statements | Executed 93 statements in 896µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Method::Generated::__ANON__[accessor role_generator defined at MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm:51] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | my $type_constraint = ${$__captures->{'$type_constraint'}}; | ||||
| 2 | my $type_constraint_obj = ${$__captures->{'$type_constraint_obj'}}; | ||||
| 3 | my $meta = ${$__captures->{'$meta'}}; | ||||
| 4 | my $attr = ${$__captures->{'$attr'}}; | ||||
| 5 | #line 37 "accessor role_generator defined at /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm" | ||||
| 6 | sub { | ||||
| 7 | |||||
| 8 | if (scalar(@_) >= 2) { | ||||
| 9 | |||||
| - - | |||||
| 12 | $type_constraint->($_[1]) || $meta->throw_error("Attribute (role_generator) does not pass the type constraint because: " . $type_constraint_obj->get_message($_[1]), data => $_[1]); | ||||
| 13 | |||||
| 14 | $_[0]->{"role_generator"} = $_[1]; | ||||
| 15 | |||||
| 16 | } | ||||
| 17 | |||||
| 18 | |||||
| 19 | return $_[0]->{"role_generator"} | ||||
| 20 | } | ||||
| 21 | ; | ||||
| 22 | |||||
| - - | |||||
| 37 | |||||
| - - | |||||
| 39 | 92 | 868µs | |||
| - - | |||||
| 43 | 2 | 26µs | # spent 26µs making 2 calls to Moose::Util::TypeConstraints::OptimizedConstraints::CodeRef, avg 13µs/call | ||
| - - | |||||
| 52 | 1 | 29µs |