| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native/Array/set.pm |
| Statements | Executed 18 statements in 1.76ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 76µs | 94µs | Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@3 |
| 1 | 1 | 1 | 47µs | 818µs | Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@71 |
| 1 | 1 | 1 | 44µs | 14.9ms | Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@10 |
| 1 | 1 | 1 | 40µs | 108µs | Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@4 |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::__ANON__[:55] |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::_adds_members |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::_inline_check_arguments |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::_inline_optimized_set_new_value |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::_maximum_arguments |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::_minimum_arguments |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::_new_members |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::_potential_value |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::Array::set::_return_value |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Moose::Meta::Method::Accessor::Native::Array::set; | ||||
| 2 | |||||
| 3 | 3 | 105µs | 2 | 112µs | # spent 94µs (76+18) within Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@3 which was called:
# once (76µs+18µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 3 # spent 94µs making 1 call to Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@3
# spent 18µs making 1 call to strict::import |
| 4 | 3 | 247µs | 2 | 176µs | # spent 108µs (40+68) within Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@4 which was called:
# once (40µs+68µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 4 # spent 108µs making 1 call to Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@4
# spent 68µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 1 | 4µs | our $VERSION = '1.19'; | ||
| 7 | 1 | 92µs | $VERSION = eval $VERSION; # spent 10µs executing statements in string eval | ||
| 8 | 1 | 3µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 9 | |||||
| 10 | 3 | 1.05ms | 2 | 29.8ms | # spent 14.9ms (44µs+14.9) within Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@10 which was called:
# once (44µs+14.9ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 10 # spent 14.9ms making 1 call to Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@10
# spent 14.9ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 11 | |||||
| 12 | 1 | 38µs | 1 | 150ms | with 'Moose::Meta::Method::Accessor::Native::Array::Writer' => { # spent 150ms making 1 call to Moose::Role::with |
| 13 | -excludes => [ | ||||
| 14 | qw( | ||||
| 15 | _minimum_arguments | ||||
| 16 | _maximum_arguments | ||||
| 17 | _inline_check_arguments | ||||
| 18 | _new_members | ||||
| 19 | _inline_optimized_set_new_value | ||||
| 20 | _return_value | ||||
| 21 | ) | ||||
| 22 | ] | ||||
| 23 | }; | ||||
| 24 | |||||
| 25 | sub _minimum_arguments { 2 } | ||||
| 26 | |||||
| 27 | sub _maximum_arguments { 2 } | ||||
| 28 | |||||
| 29 | sub _inline_check_arguments { | ||||
| 30 | my $self = shift; | ||||
| 31 | |||||
| 32 | return $self->_inline_check_var_is_valid_index('$_[0]'); | ||||
| 33 | } | ||||
| 34 | |||||
| 35 | sub _adds_members { 1 } | ||||
| 36 | |||||
| 37 | sub _potential_value { | ||||
| 38 | my ( $self, $slot_access ) = @_; | ||||
| 39 | |||||
| 40 | return | ||||
| 41 | "( do { my \@potential = \@{ ($slot_access) }; \$potential[ \$_[0] ] = \$_[1]; \\\@potential } )"; | ||||
| 42 | } | ||||
| 43 | |||||
| 44 | # We need to override this because while @_ can be written to, we cannot write | ||||
| 45 | # directly to $_[1]. | ||||
| 46 | around _inline_coerce_new_values => sub { | ||||
| 47 | shift; | ||||
| 48 | my $self = shift; | ||||
| 49 | |||||
| 50 | return q{} unless $self->associated_attribute->should_coerce; | ||||
| 51 | |||||
| 52 | return q{} unless $self->_tc_member_type_can_coerce; | ||||
| 53 | |||||
| 54 | return '@_ = ( $_[0], $member_tc_obj->coerce( $_[1] ) );'; | ||||
| 55 | 1 | 23µs | 1 | 296µs | }; # spent 296µs making 1 call to Moose::Role::around |
| 56 | |||||
| 57 | sub _new_members { '$_[1]' } | ||||
| 58 | |||||
| 59 | sub _inline_optimized_set_new_value { | ||||
| 60 | my ( $self, $inv, $new, $slot_access ) = @_; | ||||
| 61 | |||||
| 62 | return "${slot_access}->[ \$_[0] ] = \$_[1]"; | ||||
| 63 | } | ||||
| 64 | |||||
| 65 | sub _return_value { | ||||
| 66 | my ( $self, $slot_access ) = @_; | ||||
| 67 | |||||
| 68 | return "return ${slot_access}->[ \$_[0] ];"; | ||||
| 69 | } | ||||
| 70 | |||||
| 71 | 3 | 137µs | 2 | 1.59ms | # spent 818µs (47+771) within Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@71 which was called:
# once (47µs+771µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 71 # spent 818µs making 1 call to Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@71
# spent 771µs making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:557] |
| 72 | |||||
| 73 | 1 | 55µs | 1; |