Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Moose/Meta/Method/Accessor.pm |
Statements | Executed 80 statements in 551µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
5 | 2 | 1 | 43µs | 54µs | _instance_is_inlinable | Moose::Meta::Method::Accessor::
6 | 2 | 1 | 41µs | 1.81ms | _compile_code | Moose::Meta::Method::Accessor::
6 | 1 | 1 | 27µs | 359µs | _eval_environment | Moose::Meta::Method::Accessor::
4 | 1 | 1 | 18µs | 2.51ms | _generate_accessor_method | Moose::Meta::Method::Accessor::
6 | 1 | 1 | 17µs | 1.66ms | try {...} | Moose::Meta::Method::Accessor::
6 | 1 | 1 | 13µs | 13µs | new | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 9µs | 11µs | BEGIN@4 | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 8µs | 476µs | _generate_reader_method | Moose::Meta::Method::Accessor::
6 | 1 | 1 | 8µs | 8µs | _new | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 6µs | 12µs | BEGIN@5 | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 6µs | 161µs | BEGIN@12 | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 5µs | 36µs | BEGIN@9 | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 4µs | 21µs | BEGIN@7 | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | __ANON__[:35] | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | __ANON__[:41] | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _error_thrower | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _generate_clearer_method | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _generate_predicate_method | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _generate_writer_method | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _get_value | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _has_value | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_check_coercion | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_check_constraint | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_check_lazy | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_get_old_value_for_trigger | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_store_value | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_tc_code | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_trigger | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _writer_value_needs_copy | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | catch {...} | Moose::Meta::Method::Accessor::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Moose::Meta::Method::Accessor; | ||||
2 | 1 | 200ns | our $VERSION = '2.1605'; | ||
3 | |||||
4 | 2 | 14µs | 2 | 13µs | # spent 11µs (9+2) within Moose::Meta::Method::Accessor::BEGIN@4 which was called:
# once (9µs+2µs) by Moose::Meta::Attribute::BEGIN@13 at line 4 # spent 11µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@4
# spent 2µs making 1 call to strict::import |
5 | 2 | 12µs | 2 | 18µs | # spent 12µs (6+6) within Moose::Meta::Method::Accessor::BEGIN@5 which was called:
# once (6µs+6µs) by Moose::Meta::Attribute::BEGIN@13 at line 5 # spent 12µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@5
# spent 6µs making 1 call to warnings::import |
6 | |||||
7 | 2 | 16µs | 2 | 38µs | # spent 21µs (4+17) within Moose::Meta::Method::Accessor::BEGIN@7 which was called:
# once (4µs+17µs) by Moose::Meta::Attribute::BEGIN@13 at line 7 # spent 21µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@7
# spent 17µs making 1 call to Exporter::import |
8 | |||||
9 | 1 | 4µs | 1 | 30µs | # spent 36µs (5+30) within Moose::Meta::Method::Accessor::BEGIN@9 which was called:
# once (5µs+30µs) by Moose::Meta::Attribute::BEGIN@13 at line 10 # spent 30µs making 1 call to parent::import |
10 | 1 | 13µs | 1 | 36µs | 'Class::MOP::Method::Accessor'; # spent 36µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@9 |
11 | |||||
12 | 2 | 321µs | 2 | 316µs | # spent 161µs (6+155) within Moose::Meta::Method::Accessor::BEGIN@12 which was called:
# once (6µs+155µs) by Moose::Meta::Attribute::BEGIN@13 at line 12 # spent 161µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@12
# spent 155µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337] |
13 | |||||
14 | # multiple inheritance is terrible | ||||
15 | # spent 13µs within Moose::Meta::Method::Accessor::new which was called 6 times, avg 2µs/call:
# 6 times (13µs+0s) by Class::MOP::Attribute::try {...} at line 407 of Class/MOP/Attribute.pm, avg 2µs/call | ||||
16 | 6 | 18µs | 6 | 4.74ms | goto &Class::MOP::Method::Accessor::new; # spent 4.74ms making 6 calls to Class::MOP::Method::Accessor::new, avg 789µs/call |
17 | } | ||||
18 | |||||
19 | # spent 8µs within Moose::Meta::Method::Accessor::_new which was called 6 times, avg 1µs/call:
# 6 times (8µs+0s) by Class::MOP::Method::Accessor::new at line 36 of Class/MOP/Method/Accessor.pm, avg 1µs/call | ||||
20 | 6 | 12µs | 6 | 1.23ms | goto &Class::MOP::Method::Accessor::_new; # spent 1.23ms making 6 calls to Class::MOP::Method::Accessor::_new, avg 205µs/call |
21 | } | ||||
22 | |||||
23 | sub _error_thrower { | ||||
24 | my $self = shift; | ||||
25 | return $self->associated_attribute | ||||
26 | if ref($self) && defined($self->associated_attribute); | ||||
27 | return $self->SUPER::_error_thrower; | ||||
28 | } | ||||
29 | |||||
30 | # spent 1.81ms (41µs+1.77) within Moose::Meta::Method::Accessor::_compile_code which was called 6 times, avg 302µs/call:
# 4 times (23µs+1.27ms) by Class::MOP::Method::Accessor::try {...} at line 113 of Class/MOP/Method/Accessor.pm, avg 323µs/call
# 2 times (18µs+499µs) by Class::MOP::Method::Accessor::try {...} at line 151 of Class/MOP/Method/Accessor.pm, avg 259µs/call | ||||
31 | 6 | 2µs | my $self = shift; | ||
32 | 6 | 3µs | my @args = @_; | ||
33 | # spent 1.66ms (17µs+1.64) within Moose::Meta::Method::Accessor::try {...} which was called 6 times, avg 276µs/call:
# 6 times (17µs+1.64ms) by Try::Tiny::try at line 87 of Try/Tiny.pm, avg 276µs/call | ||||
34 | 6 | 17µs | 6 | 1.64ms | $self->SUPER::_compile_code(@args); # spent 1.64ms making 6 calls to Class::MOP::Method::Generated::_compile_code, avg 273µs/call |
35 | } | ||||
36 | catch { | ||||
37 | throw_exception( CouldNotCreateWriter => attribute => $self->associated_attribute, | ||||
38 | error => $_, | ||||
39 | instance => $self | ||||
40 | ); | ||||
41 | 6 | 33µs | 12 | 39µs | }; # spent 39µs making 6 calls to Try::Tiny::catch, avg 6µs/call
# spent 1.73ms making 6 calls to Try::Tiny::try, avg 289µs/call, recursion: max depth 3, sum of overlapping time 1.73ms |
42 | } | ||||
43 | |||||
44 | # spent 359µs (27+332) within Moose::Meta::Method::Accessor::_eval_environment which was called 6 times, avg 60µs/call:
# 6 times (27µs+332µs) by Class::MOP::Method::Generated::_compile_code at line 52 of Class/MOP/Method/Generated.pm, avg 60µs/call | ||||
45 | 6 | 1µs | my $self = shift; | ||
46 | 6 | 17µs | 12 | 332µs | return $self->associated_attribute->_eval_environment; # spent 328µs making 6 calls to Moose::Meta::Attribute::_eval_environment, avg 55µs/call
# spent 4µs making 6 calls to Class::MOP::Method::Accessor::associated_attribute, avg 667ns/call |
47 | } | ||||
48 | |||||
49 | # spent 54µs (43+11) within Moose::Meta::Method::Accessor::_instance_is_inlinable which was called 5 times, avg 11µs/call:
# 4 times (29µs+9µs) by Moose::Meta::Method::Accessor::_generate_accessor_method at line 68, avg 10µs/call
# once (14µs+2µs) by Moose::Meta::Method::Accessor::_generate_reader_method at line 56 | ||||
50 | 5 | 1µs | my $self = shift; | ||
51 | 5 | 43µs | 20 | 11µs | return $self->associated_attribute->associated_class->instance_metaclass->is_inlinable; # spent 4µs making 5 calls to Class::MOP::Instance::is_inlinable, avg 820ns/call
# spent 3µs making 5 calls to Class::MOP::Method::Accessor::associated_attribute, avg 640ns/call
# spent 2µs making 5 calls to Class::MOP::Class::instance_metaclass, avg 480ns/call
# spent 2µs making 5 calls to Class::MOP::Attribute::associated_class, avg 300ns/call |
52 | } | ||||
53 | |||||
54 | # spent 476µs (8+468) within Moose::Meta::Method::Accessor::_generate_reader_method which was called:
# once (8µs+468µs) by Class::MOP::Method::Accessor::_initialize_body at line 91 of Class/MOP/Method/Accessor.pm | ||||
55 | 1 | 400ns | my $self = shift; | ||
56 | 1 | 7µs | 2 | 468µs | $self->_instance_is_inlinable ? $self->_generate_reader_method_inline(@_) # spent 452µs making 1 call to Class::MOP::Method::Accessor::_generate_reader_method_inline
# spent 16µs making 1 call to Moose::Meta::Method::Accessor::_instance_is_inlinable |
57 | : $self->SUPER::_generate_reader_method(@_); | ||||
58 | } | ||||
59 | |||||
60 | sub _generate_writer_method { | ||||
61 | my $self = shift; | ||||
62 | $self->_instance_is_inlinable ? $self->_generate_writer_method_inline(@_) | ||||
63 | : $self->SUPER::_generate_writer_method(@_); | ||||
64 | } | ||||
65 | |||||
66 | # spent 2.51ms (18µs+2.50) within Moose::Meta::Method::Accessor::_generate_accessor_method which was called 4 times, avg 628µs/call:
# 4 times (18µs+2.50ms) by Class::MOP::Method::Accessor::_initialize_body at line 91 of Class/MOP/Method/Accessor.pm, avg 628µs/call | ||||
67 | 4 | 700ns | my $self = shift; | ||
68 | 4 | 15µs | 8 | 2.50ms | $self->_instance_is_inlinable ? $self->_generate_accessor_method_inline(@_) # spent 2.46ms making 4 calls to Class::MOP::Method::Accessor::_generate_accessor_method_inline, avg 615µs/call
# spent 38µs making 4 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 10µs/call |
69 | : $self->SUPER::_generate_accessor_method(@_); | ||||
70 | } | ||||
71 | |||||
72 | sub _generate_predicate_method { | ||||
73 | my $self = shift; | ||||
74 | $self->_instance_is_inlinable ? $self->_generate_predicate_method_inline(@_) | ||||
75 | : $self->SUPER::_generate_predicate_method(@_); | ||||
76 | } | ||||
77 | |||||
78 | sub _generate_clearer_method { | ||||
79 | my $self = shift; | ||||
80 | $self->_instance_is_inlinable ? $self->_generate_clearer_method_inline(@_) | ||||
81 | : $self->SUPER::_generate_clearer_method(@_); | ||||
82 | } | ||||
83 | |||||
84 | sub _writer_value_needs_copy { | ||||
85 | shift->associated_attribute->_writer_value_needs_copy(@_); | ||||
86 | } | ||||
87 | |||||
88 | sub _inline_tc_code { | ||||
89 | shift->associated_attribute->_inline_tc_code(@_); | ||||
90 | } | ||||
91 | |||||
92 | sub _inline_check_coercion { | ||||
93 | shift->associated_attribute->_inline_check_coercion(@_); | ||||
94 | } | ||||
95 | |||||
96 | sub _inline_check_constraint { | ||||
97 | shift->associated_attribute->_inline_check_constraint(@_); | ||||
98 | } | ||||
99 | |||||
100 | sub _inline_check_lazy { | ||||
101 | shift->associated_attribute->_inline_check_lazy(@_); | ||||
102 | } | ||||
103 | |||||
104 | sub _inline_store_value { | ||||
105 | shift->associated_attribute->_inline_instance_set(@_) . ';'; | ||||
106 | } | ||||
107 | |||||
108 | sub _inline_get_old_value_for_trigger { | ||||
109 | shift->associated_attribute->_inline_get_old_value_for_trigger(@_); | ||||
110 | } | ||||
111 | |||||
112 | sub _inline_trigger { | ||||
113 | shift->associated_attribute->_inline_trigger(@_); | ||||
114 | } | ||||
115 | |||||
116 | sub _get_value { | ||||
117 | shift->associated_attribute->_inline_instance_get(@_); | ||||
118 | } | ||||
119 | |||||
120 | sub _has_value { | ||||
121 | shift->associated_attribute->_inline_instance_has(@_); | ||||
122 | } | ||||
123 | |||||
124 | 1 | 2µs | 1; | ||
125 | |||||
126 | # ABSTRACT: A Moose Method metaclass for accessors | ||||
127 | |||||
128 | __END__ |