| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/SemiAffordanceAccessor/Role/Attribute.pm |
| Statements | Executed 210 statements in 2.79ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 3.82ms | 34.4ms | MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 |
| 9 | 1 | 1 | 82µs | 82µs | MooseX::SemiAffordanceAccessor::Role::Attribute::CORE:subst (opcode) |
| 1 | 1 | 1 | 55µs | 55µs | MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@2 |
| 1 | 1 | 1 | 43µs | 702µs | MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@36 |
| 1 | 1 | 1 | 39µs | 103µs | MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@7 |
| 1 | 1 | 1 | 38µs | 55µs | MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@6 |
| 0 | 0 | 0 | 0s | 0s | MooseX::SemiAffordanceAccessor::Role::Attribute::__ANON__[:34] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package MooseX::SemiAffordanceAccessor::Role::Attribute; | ||||
| 2 | # spent 55µs within MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@2 which was called:
# once (55µs+0s) by MooseX::SemiAffordanceAccessor::BEGIN@12 at line 4 | ||||
| 3 | 1 | 26µs | $MooseX::SemiAffordanceAccessor::Role::Attribute::VERSION = '0.08'; | ||
| 4 | 1 | 70µs | 1 | 55µs | } # spent 55µs making 1 call to MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@2 |
| 5 | |||||
| 6 | 3 | 93µs | 2 | 72µs | # spent 55µs (38+17) within MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@6 which was called:
# once (38µs+17µs) by MooseX::SemiAffordanceAccessor::BEGIN@12 at line 6 # spent 55µs making 1 call to MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@6
# spent 17µs making 1 call to strict::import |
| 7 | 3 | 95µs | 2 | 168µs | # spent 103µs (39+64) within MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@7 which was called:
# once (39µs+64µs) by MooseX::SemiAffordanceAccessor::BEGIN@12 at line 7 # spent 103µs making 1 call to MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@7
# spent 64µs making 1 call to warnings::import |
| 8 | |||||
| 9 | 3 | 920µs | 2 | 49.8ms | # spent 34.4ms (3.82+30.5) within MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 which was called:
# once (3.82ms+30.5ms) by MooseX::SemiAffordanceAccessor::BEGIN@12 at line 9 # spent 34.4ms making 1 call to MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9
# spent 15.5ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 10 | |||||
| 11 | before '_process_options' => sub { | ||||
| 12 | 96 | 714µs | my $class = shift; | ||
| 13 | my $name = shift; | ||||
| 14 | my $options = shift; | ||||
| 15 | |||||
| 16 | 24 | 157µs | if ( exists $options->{is} | ||
| 17 | && !( exists $options->{reader} || exists $options->{writer} ) ) { | ||||
| 18 | 75 | 566µs | if ( $options->{is} eq 'ro' ) { | ||
| 19 | $options->{reader} = $name; | ||||
| 20 | delete $options->{is}; | ||||
| 21 | } | ||||
| 22 | elsif ( $options->{is} eq 'rw' ) { | ||||
| 23 | $options->{reader} = $name; | ||||
| 24 | |||||
| 25 | my $prefix = 'set'; | ||||
| 26 | 9 | 82µs | if ( $name =~ s/^_// ) { # spent 82µs making 9 calls to MooseX::SemiAffordanceAccessor::Role::Attribute::CORE:subst, avg 9µs/call | ||
| 27 | $prefix = '_set'; | ||||
| 28 | } | ||||
| 29 | |||||
| 30 | $options->{writer} = $prefix . q{_} . $name; | ||||
| 31 | delete $options->{is}; | ||||
| 32 | } | ||||
| 33 | } | ||||
| 34 | 1 | 23µs | 1 | 365µs | }; # spent 365µs making 1 call to Moose::Role::before |
| 35 | |||||
| 36 | 3 | 106µs | 2 | 1.36ms | # spent 702µs (43+659) within MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@36 which was called:
# once (43µs+659µs) by MooseX::SemiAffordanceAccessor::BEGIN@12 at line 36 # spent 702µs making 1 call to MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@36
# spent 659µs making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:557] |
| 37 | |||||
| 38 | 1 | 25µs | 1; | ||
| 39 | |||||
| - - | |||||
| 42 | __END__ | ||||
# spent 82µs within MooseX::SemiAffordanceAccessor::Role::Attribute::CORE:subst which was called 9 times, avg 9µs/call:
# 9 times (82µs+0s) by Class::MOP::Class:::before at line 26, avg 9µs/call |