| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm |
| Statements | Executed 575 statements in 24.4ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 14 | 3 | 3 | 2.00ms | 2.67ms | Moose::Meta::Method::Accessor::Native::_inline_check_argument_count |
| 38 | 3 | 2 | 1.84ms | 6.56ms | Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined |
| 14 | 1 | 1 | 1.28ms | 7.13ms | Moose::Meta::Method::Accessor::Native::__ANON__[:106] |
| 14 | 1 | 1 | 882µs | 7.54ms | Moose::Meta::Method::Accessor::Native::__ANON__[:136] |
| 14 | 1 | 1 | 799µs | 72.9ms | Moose::Meta::Method::Accessor::Native::_initialize_body |
| 14 | 2 | 2 | 675µs | 817µs | Moose::Meta::Method::Accessor::Native::_inline_curried_arguments |
| 42 | 1 | 1 | 445µs | 445µs | Moose::Meta::Method::Accessor::Native::root_types |
| 1 | 1 | 1 | 78µs | 95µs | Moose::Meta::Method::Accessor::Native::BEGIN@3 |
| 7 | 1 | 1 | 57µs | 57µs | Moose::Meta::Method::Accessor::Native::_minimum_arguments |
| 1 | 1 | 1 | 48µs | 698µs | Moose::Meta::Method::Accessor::Native::BEGIN@144 |
| 1 | 1 | 1 | 45µs | 14.6ms | Moose::Meta::Method::Accessor::Native::BEGIN@13 |
| 1 | 1 | 1 | 40µs | 106µs | Moose::Meta::Method::Accessor::Native::BEGIN@4 |
| 1 | 1 | 1 | 39µs | 204µs | Moose::Meta::Method::Accessor::Native::BEGIN@6 |
| 1 | 1 | 1 | 39µs | 206µs | Moose::Meta::Method::Accessor::Native::BEGIN@7 |
| 3 | 1 | 1 | 24µs | 24µs | Moose::Meta::Method::Accessor::Native::_maximum_arguments |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::__ANON__[:114] |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::__ANON__[:33] |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::Accessor::Native::__ANON__[:41] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Moose::Meta::Method::Accessor::Native; | ||||
| 2 | |||||
| 3 | 3 | 104µs | 2 | 113µs | # spent 95µs (78+18) within Moose::Meta::Method::Accessor::Native::BEGIN@3 which was called:
# once (78µ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 95µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@3
# spent 18µs making 1 call to strict::import |
| 4 | 3 | 123µs | 2 | 173µs | # spent 106µs (40+67) within Moose::Meta::Method::Accessor::Native::BEGIN@4 which was called:
# once (40µs+67µ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 106µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@4
# spent 67µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 3 | 110µs | 2 | 369µs | # spent 204µs (39+165) within Moose::Meta::Method::Accessor::Native::BEGIN@6 which was called:
# once (39µs+165µ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 6 # spent 204µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@6
# spent 165µs making 1 call to Exporter::import |
| 7 | 3 | 236µs | 2 | 373µs | # spent 206µs (39+167) within Moose::Meta::Method::Accessor::Native::BEGIN@7 which was called:
# once (39µs+167µ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 7 # spent 206µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@7
# spent 167µs making 1 call to Exporter::import |
| 8 | |||||
| 9 | 1 | 4µs | our $VERSION = '1.19'; | ||
| 10 | 1 | 79µs | $VERSION = eval $VERSION; # spent 11µs executing statements in string eval | ||
| 11 | 1 | 3µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 12 | |||||
| 13 | 3 | 2.40ms | 2 | 29.1ms | # spent 14.6ms (45µs+14.5) within Moose::Meta::Method::Accessor::Native::BEGIN@13 which was called:
# once (45µs+14.5ms) 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 13 # spent 14.6ms making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@13
# spent 14.5ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 14 | |||||
| 15 | around new => sub { | ||||
| 16 | 14 | 53µs | my $orig = shift; | ||
| 17 | 14 | 87µs | my $class = shift; | ||
| 18 | 14 | 203µs | my %options = @_; | ||
| 19 | |||||
| 20 | 14 | 47µs | exists $options{curried_arguments} | ||
| 21 | || ( $options{curried_arguments} = [] ); | ||||
| 22 | |||||
| 23 | 14 | 91µs | ( $options{curried_arguments} | ||
| 24 | && ( 'ARRAY' eq ref $options{curried_arguments} ) ) | ||||
| 25 | || confess | ||||
| 26 | 'You must supply a curried_arguments which is an ARRAY reference'; | ||||
| 27 | |||||
| 28 | 14 | 223µs | 14 | 160µs | $options{definition_context} = $options{attribute}->definition_context; # spent 160µs making 14 calls to Class::MOP::Mixin::AttributeCore::definition_context, avg 11µs/call |
| 29 | |||||
| 30 | 14 | 67µs | $options{accessor_type} = 'native'; | ||
| 31 | |||||
| 32 | 14 | 535µs | 14 | 87.7ms | return $class->$orig(%options); # spent 87.7ms making 14 calls to Class::MOP::Method::Accessor::new, avg 6.26ms/call |
| 33 | 1 | 22µs | 1 | 379µs | }; # spent 379µs making 1 call to Moose::Role::around |
| 34 | |||||
| 35 | around _new => sub { | ||||
| 36 | 14 | 32µs | shift; | ||
| 37 | 14 | 49µs | my $class = shift; | ||
| 38 | 14 | 59µs | my $options = @_ == 1 ? $_[0] : {@_}; | ||
| 39 | |||||
| 40 | 14 | 11.9ms | return bless $options, $class; | ||
| 41 | 1 | 19µs | 1 | 272µs | }; # spent 272µs making 1 call to Moose::Role::around |
| 42 | |||||
| 43 | 42 | 589µs | # spent 445µs within Moose::Meta::Method::Accessor::Native::root_types which was called 42 times, avg 11µs/call:
# 42 times (445µs+0s) by Moose::Meta::Method::Accessor::Native::Writer::_is_root_type at line 110 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 11µs/call | ||
| 44 | |||||
| 45 | # spent 72.9ms (799µs+72.1) within Moose::Meta::Method::Accessor::Native::_initialize_body which was called 14 times, avg 5.21ms/call:
# 14 times (799µs+72.1ms) by Class::MOP::Method::Accessor::new at line 39 of Class/MOP/Method/Accessor.pm, avg 5.21ms/call | ||||
| 46 | 14 | 46µs | my $self = shift; | ||
| 47 | |||||
| 48 | 14 | 551µs | 28 | 72.1ms | $self->{'body'} = $self->_eval_code( $self->_generate_method ); # spent 40.0ms making 10 calls to Moose::Meta::Method::Accessor::Native::Writer::_generate_method, avg 4.00ms/call
# spent 26.4ms making 14 calls to Moose::Meta::Method::Accessor::_eval_code, avg 1.89ms/call
# spent 5.67ms making 4 calls to Moose::Meta::Method::Accessor::Native::Reader::_generate_method, avg 1.42ms/call |
| 49 | |||||
| 50 | 14 | 183µs | return; | ||
| 51 | } | ||||
| 52 | |||||
| 53 | # spent 817µs (675+142) within Moose::Meta::Method::Accessor::Native::_inline_curried_arguments which was called 14 times, avg 58µs/call:
# 10 times (501µs+102µs) by Moose::Meta::Method::Accessor::Native::Writer::_generate_method at line 31 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 60µs/call
# 4 times (174µs+40µs) by Moose::Meta::Method::Accessor::Native::Reader::_generate_method at line 26 of Moose/Meta/Method/Accessor/Native/Reader.pm, avg 53µs/call | ||||
| 54 | 14 | 44µs | my $self = shift; | ||
| 55 | |||||
| 56 | 14 | 607µs | 14 | 142µs | return q{} unless @{ $self->curried_arguments }; # spent 142µs making 14 calls to Moose::Meta::Method::Delegation::curried_arguments, avg 10µs/call |
| 57 | |||||
| 58 | return 'unshift @_, @curried;' | ||||
| 59 | } | ||||
| 60 | |||||
| 61 | # spent 2.67ms (2.00+670µs) within Moose::Meta::Method::Accessor::Native::_inline_check_argument_count which was called 14 times, avg 190µs/call:
# 8 times (1.13ms+384µs) by Moose::Meta::Method::Accessor::Native::Writer::_writer_core at line 47 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 189µs/call
# 4 times (639µs+192µs) by Moose::Meta::Method::Accessor::Native::Reader::_reader_core at line 42 of Moose/Meta/Method/Accessor/Native/Reader.pm, avg 208µs/call
# 2 times (226µs+94µs) by Class::MOP::Class:::around at line 37 of Moose/Meta/Method/Accessor/Native/Hash/set.pm, avg 160µs/call | ||||
| 62 | 14 | 44µs | my $self = shift; | ||
| 63 | |||||
| 64 | 14 | 38µs | my $code = q{}; | ||
| 65 | |||||
| 66 | 14 | 183µs | 14 | 117µs | if ( my $min = $self->_minimum_arguments ) { # spent 57µs making 7 calls to Moose::Meta::Method::Accessor::Native::_minimum_arguments, avg 8µs/call
# spent 18µs making 2 calls to Moose::Meta::Method::Accessor::Native::Hash::set::_minimum_arguments, avg 9µs/call
# spent 17µs making 2 calls to Moose::Meta::Method::Accessor::Native::Hash::get::_minimum_arguments, avg 8µs/call
# spent 9µs making 1 call to Moose::Meta::Method::Accessor::Native::Counter::inc::_minimum_arguments
# spent 9µs making 1 call to Moose::Meta::Method::Accessor::Native::String::append::_minimum_arguments
# spent 9µs making 1 call to Moose::Meta::Method::Accessor::Native::Counter::dec::_minimum_arguments |
| 67 | 5 | 188µs | 5 | 58µs | my $err_msg = sprintf( # spent 58µs making 5 calls to Moose::Meta::Method::Delegation::delegate_to_method, avg 12µs/call |
| 68 | q{"Cannot call %s without at least %s argument%s"}, | ||||
| 69 | $self->delegate_to_method, | ||||
| 70 | $min, | ||||
| 71 | ( $min == 1 ? q{} : 's' ) | ||||
| 72 | ); | ||||
| 73 | |||||
| 74 | 5 | 128µs | 5 | 91µs | $code # spent 91µs making 5 calls to Moose::Meta::Method::_inline_throw_error, avg 18µs/call |
| 75 | .= "\n" | ||||
| 76 | . $self->_inline_throw_error($err_msg) | ||||
| 77 | . " unless \@_ >= $min;"; | ||||
| 78 | } | ||||
| 79 | |||||
| 80 | 14 | 214µs | 14 | 126µs | if ( defined( my $max = $self->_maximum_arguments ) ) { # spent 24µs making 3 calls to Moose::Meta::Method::Accessor::Native::_maximum_arguments, avg 8µs/call
# spent 17µs making 2 calls to Moose::Meta::Method::Accessor::Native::Hash::set::_maximum_arguments, avg 9µs/call
# spent 12µs making 1 call to Moose::Meta::Method::Accessor::Native::Bool::set::_maximum_arguments
# spent 10µs making 1 call to Moose::Meta::Method::Accessor::Native::String::clear::_maximum_arguments
# spent 10µs making 1 call to Moose::Meta::Method::Accessor::Native::String::length::_maximum_arguments
# spent 10µs making 1 call to Moose::Meta::Method::Accessor::Native::Array::clear::_maximum_arguments
# spent 9µs making 1 call to Moose::Meta::Method::Accessor::Native::Array::elements::_maximum_arguments
# spent 9µs making 1 call to Moose::Meta::Method::Accessor::Native::Bool::unset::_maximum_arguments
# spent 8µs making 1 call to Moose::Meta::Method::Accessor::Native::Counter::inc::_maximum_arguments
# spent 8µs making 1 call to Moose::Meta::Method::Accessor::Native::String::append::_maximum_arguments
# spent 8µs making 1 call to Moose::Meta::Method::Accessor::Native::Counter::dec::_maximum_arguments |
| 81 | 9 | 394µs | 9 | 109µs | my $err_msg = sprintf( # spent 109µs making 9 calls to Moose::Meta::Method::Delegation::delegate_to_method, avg 12µs/call |
| 82 | q{"Cannot call %s with %s argument%s"}, | ||||
| 83 | $self->delegate_to_method, | ||||
| 84 | ( $max ? "more than $max" : 'any' ), | ||||
| 85 | ( $max == 1 ? q{} : 's' ) | ||||
| 86 | ); | ||||
| 87 | |||||
| 88 | 9 | 250µs | 9 | 168µs | $code # spent 168µs making 9 calls to Moose::Meta::Method::_inline_throw_error, avg 19µs/call |
| 89 | .= "\n" | ||||
| 90 | . $self->_inline_throw_error($err_msg) | ||||
| 91 | . " if \@_ > $max;"; | ||||
| 92 | } | ||||
| 93 | |||||
| 94 | 14 | 206µs | return $code; | ||
| 95 | } | ||||
| 96 | |||||
| 97 | 7 | 105µs | # spent 57µs within Moose::Meta::Method::Accessor::Native::_minimum_arguments which was called 7 times, avg 8µs/call:
# 7 times (57µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 66, avg 8µs/call | ||
| 98 | 3 | 40µs | # spent 24µs within Moose::Meta::Method::Accessor::Native::_maximum_arguments which was called 3 times, avg 8µs/call:
# 3 times (24µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 80, avg 8µs/call | ||
| 99 | |||||
| 100 | # spent 7.13ms (1.28+5.85) within Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:106] which was called 14 times, avg 509µs/call:
# 14 times (1.28ms+5.85ms) by Class::MOP::Class::__ANON__::SERIAL::10::_inline_get or Class::MOP::Class::__ANON__::SERIAL::12::_inline_get or Class::MOP::Class::__ANON__::SERIAL::13::_inline_get or Class::MOP::Class::__ANON__::SERIAL::16::_inline_get or Class::MOP::Class::__ANON__::SERIAL::17::_inline_get or Class::MOP::Class::__ANON__::SERIAL::18::_inline_get or Class::MOP::Class::__ANON__::SERIAL::20::_inline_get or Class::MOP::Class::__ANON__::SERIAL::21::_inline_get or Class::MOP::Class::__ANON__::SERIAL::22::_inline_get or Class::MOP::Class::__ANON__::SERIAL::6::_inline_get or Class::MOP::Class::__ANON__::SERIAL::7::_inline_get or Class::MOP::Class::__ANON__::SERIAL::9::_inline_get at line 36 of Moose/Meta/Method/Overridden.pm, avg 509µs/call | ||||
| 101 | 14 | 51µs | my ( $self, $instance ) = @_; | ||
| 102 | |||||
| 103 | 14 | 526µs | 28 | 5.85ms | return $self->_slot_access_can_be_inlined # spent 2.97ms making 14 calls to Moose::Role::super, avg 212µs/call
# spent 2.87ms making 14 calls to Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined, avg 205µs/call |
| 104 | ? super() | ||||
| 105 | : "${instance}->\$reader"; | ||||
| 106 | 1 | 18µs | 1 | 528µs | }; # spent 528µs making 1 call to Moose::Role::override |
| 107 | |||||
| 108 | override _inline_store => sub { | ||||
| 109 | my ( $self, $instance, $value ) = @_; | ||||
| 110 | |||||
| 111 | return $self->_slot_access_can_be_inlined | ||||
| 112 | ? super() | ||||
| 113 | : "${instance}->\$writer($value)"; | ||||
| 114 | 1 | 19µs | 1 | 416µs | }; # spent 416µs making 1 call to Moose::Role::override |
| 115 | |||||
| 116 | # spent 7.54ms (882µs+6.66) within Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:136] which was called 14 times, avg 538µs/call:
# 14 times (882µs+6.66ms) by Class::MOP::Class::__ANON__::SERIAL::10::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::12::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::13::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::16::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::17::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::18::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::20::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::21::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::22::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::6::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::7::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::9::_eval_environment at line 36 of Moose/Meta/Method/Overridden.pm, avg 538µs/call | ||||
| 117 | 14 | 43µs | my $self = shift; | ||
| 118 | |||||
| 119 | 14 | 168µs | 14 | 4.43ms | my $env = super(); # spent 4.43ms making 14 calls to Moose::Role::super, avg 316µs/call |
| 120 | |||||
| 121 | 14 | 216µs | 14 | 159µs | $env->{'@curried'} = $self->curried_arguments; # spent 159µs making 14 calls to Moose::Meta::Method::Delegation::curried_arguments, avg 11µs/call |
| 122 | |||||
| 123 | 14 | 387µs | 14 | 2.07ms | return $env if $self->_slot_access_can_be_inlined; # spent 2.07ms making 14 calls to Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined, avg 148µs/call |
| 124 | |||||
| 125 | my $reader = $self->associated_attribute->get_read_method_ref; | ||||
| 126 | $reader = $reader->body if blessed $reader; | ||||
| 127 | |||||
| 128 | $env->{'$reader'} = \$reader; | ||||
| 129 | |||||
| 130 | my $writer = $self->associated_attribute->get_write_method_ref; | ||||
| 131 | $writer = $writer->body if blessed $writer; | ||||
| 132 | |||||
| 133 | $env->{'$writer'} = \$writer; | ||||
| 134 | |||||
| 135 | return $env; | ||||
| 136 | 1 | 20µs | 1 | 405µs | }; # spent 405µs making 1 call to Moose::Role::override |
| 137 | |||||
| 138 | # spent 6.56ms (1.84+4.72) within Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined which was called 38 times, avg 173µs/call:
# 14 times (980µs+1.89ms) by Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:106] at line 103, avg 205µs/call
# 14 times (482µs+1.59ms) by Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:136] at line 123, avg 148µs/call
# 10 times (373µs+1.24ms) by Moose::Meta::Method::Accessor::Native::Writer::_inline_set_new_value at line 161 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 161µs/call | ||||
| 139 | 38 | 106µs | my $self = shift; | ||
| 140 | |||||
| 141 | 38 | 2.32ms | 76 | 4.72ms | return $self->is_inline && $self->_instance_is_inlinable; # spent 4.31ms making 38 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 113µs/call
# spent 410µs making 38 calls to Class::MOP::Method::Generated::is_inline, avg 11µs/call |
| 142 | } | ||||
| 143 | |||||
| 144 | 3 | 126µs | 2 | 1.35ms | # spent 698µs (48+650) within Moose::Meta::Method::Accessor::Native::BEGIN@144 which was called:
# once (48µs+650µ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 144 # spent 698µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@144
# spent 650µs making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:557] |
| 145 | |||||
| 146 | 1 | 56µs | 1; |