← Index
NYTProf Performance Profile   « line view »
For /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/bin/perlcritic
  Run on Sat Mar 19 22:12:22 2016
Reported on Sat Mar 19 22:14:12 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/ControlStructures/ProhibitMutatingListFunctions.pm
StatementsExecuted 33157 statements in 68.2ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
134811159.6ms167msPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::violatesPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::violates
551110.2ms50.5msPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_has_topic_side_effectPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_has_topic_side_effect
321113.96ms9.37msPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_is_assignment_to_topicPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_assignment_to_topic
321111.59ms2.33msPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_is_topic_mutating_regexPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_topic_mutating_regex
321111.24ms4.13msPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_is_topic_mutating_funcPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_topic_mutating_func
321111.20ms2.40msPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_is_topicPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_topic
321111.06ms7.29msPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_is_topic_mutating_substrPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_topic_mutating_substr
14411291µs291µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::applies_toPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::applies_to
3811155µs209µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_is_assignment_operatorPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_assignment_operator
191177µs99µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_is_increment_operatorPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_increment_operator
11174µs103µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::supported_parametersPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::supported_parameters
11130µs35µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::initialize_if_enabledPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::initialize_if_enabled
11116µs16µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::BEGIN@10Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@10
11112µs226µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::BEGIN@15Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@15
11110µs13µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_get_cpan_list_funcsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_get_cpan_list_funcs
11110µs21µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::BEGIN@11Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@11
1118µs12µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::BEGIN@12Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@12
1118µs703µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::BEGIN@17Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@17
1117µs28µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::BEGIN@13Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@13
1117µs59µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::BEGIN@21Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@21
1116µs7µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::default_severityPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::default_severity
1113µs3µsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_get_list_moreutils_funcsPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_get_list_moreutils_funcs
0000s0sPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::__ANON__[:209]Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::__ANON__[:209]
0000s0sPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::_is_binding_operatorPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_binding_operator
0000s0sPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::::default_themesPerl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::default_themes
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1##############################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
6##############################################################################
7
8package Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions;
9
10237µs116µs
# spent 16µs within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@10 which was called: # once (16µs+0s) by Module::Pluggable::Object::_require at line 10
use 5.006001;
11234µs232µs
# spent 21µs (10+11) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@11 which was called: # once (10µs+11µs) by Module::Pluggable::Object::_require at line 11
use strict;
# spent 21µs making 1 call to Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@11 # spent 11µs making 1 call to strict::import
12221µs216µs
# spent 12µs (8+4) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@12 which was called: # once (8µs+4µs) by Module::Pluggable::Object::_require at line 12
use warnings;
# spent 12µs making 1 call to Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@12 # spent 4µs making 1 call to warnings::import
13223µs248µs
# spent 28µs (7+20) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@13 which was called: # once (7µs+20µs) by Module::Pluggable::Object::_require at line 13
use Readonly;
# spent 28µs making 1 call to Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@13 # spent 20µs making 1 call to Exporter::import
14
15232µs2440µs
# spent 226µs (12+214) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@15 which was called: # once (12µs+214µs) by Module::Pluggable::Object::_require at line 15
use List::MoreUtils qw( none any );
# spent 226µs making 1 call to Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@15 # spent 214µs making 1 call to Exporter::Tiny::import
16
171200ns
# spent 703µs (8+695) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@17 which was called: # once (8µs+695µs) by Module::Pluggable::Object::_require at line 19
use Perl::Critic::Utils qw{
18 :booleans :characters :severities :data_conversion :classification :ppi
19126µs21.40ms};
# spent 703µs making 1 call to Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@17 # spent 695µs making 1 call to Exporter::import
20
212900µs2111µs
# spent 59µs (7+52) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@21 which was called: # once (7µs+52µs) by Module::Pluggable::Object::_require at line 21
use base 'Perl::Critic::Policy';
# spent 59µs making 1 call to Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::BEGIN@21 # spent 52µs making 1 call to base::import
22
231600nsour $VERSION = '1.121';
24
25#-----------------------------------------------------------------------------
26
2712µs130µsReadonly::Array my @BUILTIN_LIST_FUNCS => qw( map grep );
# spent 30µs making 1 call to Readonly::Array
2815µs242µsReadonly::Array my @CPAN_LIST_FUNCS => _get_cpan_list_funcs();
29
30#-----------------------------------------------------------------------------
31
32
# spent 13µs (10+3) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_get_cpan_list_funcs which was called: # once (10µs+3µs) by Module::Pluggable::Object::_require at line 28
sub _get_cpan_list_funcs {
33 return qw( List::Util::first ),
3419µs13µs map { 'List::MoreUtils::'.$_ } _get_list_moreutils_funcs();
35}
36
37#-----------------------------------------------------------------------------
38
39
# spent 3µs within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_get_list_moreutils_funcs which was called: # once (3µs+0s) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_get_cpan_list_funcs at line 34
sub _get_list_moreutils_funcs {
4016µs return qw(any all none notall true false firstidx first_index
41 lastidx last_index insert_after insert_after_string);
42}
43
44#-----------------------------------------------------------------------------
45
46
# spent 2.40ms (1.20+1.20) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_topic which was called 321 times, avg 7µs/call: # 321 times (1.20ms+1.20ms) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_assignment_to_topic at line 134, avg 7µs/call
sub _is_topic {
4732140µs my $elem = shift;
483213.89ms3781.20ms return defined $elem
# spent 879µs making 57 calls to PPI::Element::__eq, avg 15µs/call # spent 323µs making 321 calls to UNIVERSAL::isa, avg 1µs/call
49 && $elem->isa('PPI::Token::Magic')
50 && $elem eq q{$_}; ##no critic (InterpolationOfMetachars)
51}
52
53
54#-----------------------------------------------------------------------------
55
5611µs125µsReadonly::Scalar my $DESC => q{Don't modify $_ in list functions}; ##no critic (InterpolationOfMetachars)
# spent 25µs making 1 call to Readonly::Scalar
5712µs144µsReadonly::Scalar my $EXPL => [ 114 ];
# spent 44µs making 1 call to Readonly::Scalar
58
59#-----------------------------------------------------------------------------
60
61
# spent 103µs (74+30) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::supported_parameters which was called: # once (74µs+30µs) by Perl::Critic::Policy::new at line 88 of Perl/Critic/Policy.pm
sub supported_parameters {
62 return (
63 {
64148µs2030µs name => 'list_funcs',
# spent 23µs making 15 calls to Readonly::Array::FETCH, avg 2µs/call # spent 4µs making 3 calls to Readonly::Scalar::FETCH, avg 1µs/call # spent 3µs making 2 calls to Readonly::Array::FETCHSIZE, avg 2µs/call
65 description => 'The base set of functions to check.',
66 default_string => join ($SPACE, @BUILTIN_LIST_FUNCS, @CPAN_LIST_FUNCS ),
67 behavior => 'string list',
68 },
69 {
70 name => 'add_list_funcs',
71 description => 'The set of functions to check, in addition to those given in list_funcs.',
72 default_string => $EMPTY,
73 behavior => 'string list',
74 },
75 );
76}
77
7812µs
# spent 7µs (6+1) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::default_severity which was called: # once (6µs+1µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm
sub default_severity { return $SEVERITY_HIGHEST }
79sub default_themes { return qw(core bugs pbp certrule ) }
80144375µs
# spent 291µs within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::applies_to which was called 144 times, avg 2µs/call: # 144 times (291µs+0s) by Perl::Critic::_critique at line 165 of Perl/Critic.pm, avg 2µs/call
sub applies_to { return 'PPI::Token::Word' }
81
82#-----------------------------------------------------------------------------
83
84
# spent 35µs (30+6) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::initialize_if_enabled which was called: # once (30µs+6µs) by Perl::Critic::Config::_add_policy_if_enabled at line 202 of Perl/Critic/Config.pm
sub initialize_if_enabled {
851400ns my ($self, $config) = @_;
86
87 $self->{_all_list_funcs} = {
88110µs14µs hashify keys %{ $self->{_list_funcs} }, keys %{ $self->{_add_list_funcs} }
# spent 4µs making 1 call to Perl::Critic::Utils::hashify
89 };
90
9112µs return $TRUE;
92}
93
94#-----------------------------------------------------------------------------
95
96
# spent 167ms (59.6+107) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::violates which was called 13481 times, avg 12µs/call: # 13481 times (59.6ms+107ms) by Perl::Critic::_critique at line 183 of Perl/Critic.pm, avg 12µs/call
sub violates {
97134812.90ms my ($self, $elem, $doc) = @_;
98
99 # Is this element a list function?
1001348146.8ms1348114.9ms return if not $self->{_all_list_funcs}->{$elem};
# spent 14.9ms making 13481 calls to PPI::Token::content, avg 1µs/call
10155119µs5539.3ms return if not is_function_call($elem);
# spent 39.3ms making 55 calls to Perl::Critic::Utils::is_function_call, avg 714µs/call
102
103 # Only the block form of list functions can be analyzed.
10455239µs1102.53ms return if not my $first_arg = first_arg( $elem );
# spent 2.50ms making 55 calls to Perl::Critic::Utils::first_arg, avg 45µs/call # spent 30µs making 55 calls to PPI::Util::TRUE, avg 540ns/call
10555179µs5542µs return if not $first_arg->isa('PPI::Structure::Block');
# spent 42µs making 55 calls to UNIVERSAL::isa, avg 755ns/call
10655199µs5550.5ms return if not $self->_has_topic_side_effect( $first_arg, $doc );
107
108 # Must be a violation
109 return $self->violation( $DESC, $EXPL, $elem );
110}
111
112#-----------------------------------------------------------------------------
113
114
# spent 50.5ms (10.2+40.2) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_has_topic_side_effect which was called 55 times, avg 917µs/call: # 55 times (10.2ms+40.2ms) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::violates at line 106, avg 917µs/call
sub _has_topic_side_effect {
1155525µs my ( $self, $node, $doc ) = @_;
116
117 # Search through all significant elements in the block,
118 # testing each element to see if it mutates the topic.
11955108µs5516.6ms my $tokens = $node->find( 'PPI::Token' ) || [];
# spent 16.6ms making 55 calls to PPI::Node::find, avg 302µs/call
1205593µs for my $elem ( @{ $tokens } ) {
121526628µs526492µs next if not $elem->significant();
# spent 283µs making 321 calls to PPI::Element::significant, avg 882ns/call # spent 209µs making 205 calls to PPI::Token::Whitespace::significant, avg 1µs/call
122321341µs3219.37ms return 1 if _is_assignment_to_topic( $elem );
123321395µs3212.33ms return 1 if $self->_is_topic_mutating_regex( $elem, $doc );
124321331µs3214.13ms return 1 if _is_topic_mutating_func( $elem );
125321454µs3217.29ms return 1 if _is_topic_mutating_substr( $elem );
126 }
12755175µs return;
128}
129
130#-----------------------------------------------------------------------------
131
132
# spent 9.37ms (3.96+5.42) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_assignment_to_topic which was called 321 times, avg 29µs/call: # 321 times (3.96ms+5.42ms) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_has_topic_side_effect at line 122, avg 29µs/call
sub _is_assignment_to_topic {
13332170µs my $elem = shift;
134321716µs3212.40ms return if not _is_topic( $elem );
135
1365791µs571.39ms my $sib = $elem->snext_sibling();
# spent 1.39ms making 57 calls to PPI::Element::snext_sibling, avg 24µs/call
13757287µs114262µs if ($sib && $sib->isa('PPI::Token::Operator')) {
# spent 209µs making 38 calls to Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_assignment_operator, avg 5µs/call # spent 31µs making 38 calls to UNIVERSAL::isa, avg 818ns/call # spent 22µs making 38 calls to PPI::Util::TRUE, avg 582ns/call
138 return 1 if _is_assignment_operator( $sib );
139 }
140
14157101µs571.23ms my $psib = $elem->sprevious_sibling();
# spent 1.23ms making 57 calls to PPI::Element::sprevious_sibling, avg 22µs/call
14257162µs61127µs if ($psib && $psib->isa('PPI::Token::Operator')) {
# spent 99µs making 19 calls to Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_increment_operator, avg 5µs/call # spent 15µs making 21 calls to UNIVERSAL::isa, avg 724ns/call # spent 12µs making 21 calls to PPI::Util::TRUE, avg 571ns/call
143 return 1 if _is_increment_operator( $psib );
144 }
145
14657128µs return;
147}
148
149#-----------------------------------------------------------------------------
150
151
# spent 2.33ms (1.59+745µs) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_topic_mutating_regex which was called 321 times, avg 7µs/call: # 321 times (1.59ms+745µs) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_has_topic_side_effect at line 123, avg 7µs/call
sub _is_topic_mutating_regex {
15232189µs my ( $self, $elem, $doc ) = @_;
1533212.45ms642745µs return if ! ( $elem->isa('PPI::Token::Regexp::Substitute')
# spent 745µs making 642 calls to UNIVERSAL::isa, avg 1µs/call
154 || $elem->isa('PPI::Token::Regexp::Transliterate') );
155
156 # Exempt PPI::Token::Regexp::Transliterate objects IF the replacement
157 # string is empty AND neither the /d or /s flags are specified, OR the
158 # replacement string equals the match string AND neither the /c or /s
159 # flags are specified. RT 44515.
160 #
161 # NOTE that, at least as of 5.14.2, tr/// does _not_ participate in the
162 # 'use re /modifiers' mechanism. And a good thing, too, since the
163 # modifiers that _are_ common (/s and /d) mean something completely
164 # different in tr///.
165 if ( $elem->isa( 'PPI::Token::Regexp::Transliterate') ) {
166 my $subs = $elem->get_substitute_string();
167 my %mods = $elem->get_modifiers();
168 $mods{r} and return; # Introduced in Perl 5.13.7
169 if ( $EMPTY eq $subs ) {
170 $mods{d} or $mods{s} or return;
171 } elsif ( $elem->get_match_string() eq $subs ) {
172 $mods{c} or $mods{s} or return;
173 }
174 }
175
176 # As of 5.13.2, the substitute built-in supports the /r modifier, which
177 # causes the operation to return the modified string and leave the
178 # original unmodified. This does not parse under earlier Perls, so there
179 # is no version check.
180
181 if ( $elem->isa( 'PPI::Token::Regexp::Substitute' ) ) {
182 my $re = $doc->ppix_regexp_from_element( $elem )
183 or return;
184 $re->modifier_asserted( 'r' )
185 and return;
186 }
187
188 # If the previous sibling does not exist, then
189 # the regex implicitly binds to $_
190 my $prevsib = $elem->sprevious_sibling;
191 return 1 if not $prevsib;
192
193 # If the previous sibling does exist, then it
194 # should be a binding operator.
195 return 1 if not _is_binding_operator( $prevsib );
196
197 # Check if the sibling before the biding operator
198 # is explicitly set to $_
199 my $bound_to = $prevsib->sprevious_sibling;
200 return _is_topic( $bound_to );
201}
202
203#-----------------------------------------------------------------------------
204
205
# spent 4.13ms (1.24+2.89) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_topic_mutating_func which was called 321 times, avg 13µs/call: # 321 times (1.24ms+2.89ms) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_has_topic_side_effect at line 124, avg 13µs/call
sub _is_topic_mutating_func {
20632161µs my $elem = shift;
2073211.38ms321280µs return if not $elem->isa('PPI::Token::Word');
# spent 280µs making 321 calls to UNIVERSAL::isa, avg 873ns/call
2084253µs my @mutator_funcs = qw(chop chomp undef);
209168479µs1683.92ms return if not any { $elem eq $_ } @mutator_funcs;
# spent 2.14ms making 42 calls to List::MoreUtils::any, avg 51µs/call # spent 1.78ms making 126 calls to PPI::Element::__eq, avg 14µs/call
21011µs1431µs return if not is_function_call( $elem );
# spent 431µs making 1 call to Perl::Critic::Utils::is_function_call
211
212 # If these functions have no argument,
213 # they default to mutating $_
21411µs126µs my $first_arg = first_arg( $elem );
# spent 26µs making 1 call to Perl::Critic::Utils::first_arg
2151400ns if (not defined $first_arg) {
216 # undef does not default to $_, unlike the others
21714µs114µs return if $elem eq 'undef';
# spent 14µs making 1 call to PPI::Element::__eq
218 return 1;
219 }
220 return _is_topic( $first_arg );
221}
222
223#-----------------------------------------------------------------------------
224
22511µs121µsReadonly::Scalar my $MUTATING_SUBSTR_ARG_COUNT => 4;
# spent 21µs making 1 call to Readonly::Scalar
226
227
# spent 7.29ms (1.06+6.24) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_topic_mutating_substr which was called 321 times, avg 23µs/call: # 321 times (1.06ms+6.24ms) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_has_topic_side_effect at line 125, avg 23µs/call
sub _is_topic_mutating_substr {
22832156µs my $elem = shift;
2293213.39ms3215.37ms return if $elem ne 'substr';
# spent 5.37ms making 321 calls to PPI::Element::__ne, avg 17µs/call
230118µs1432µs return if not is_function_call( $elem );
# spent 432µs making 1 call to Perl::Critic::Utils::is_function_call
231
232 # check and see if the first arg is $_
23313µs1433µs my @args = parse_arg_list( $elem );
# spent 433µs making 1 call to Perl::Critic::Utils::parse_arg_list
23415µs11µs return @args >= $MUTATING_SUBSTR_ARG_COUNT && _is_topic( $args[0]->[0] );
# spent 1µs making 1 call to Readonly::Scalar::FETCH
235}
236
237#-----------------------------------------------------------------------------
238
239{
240 ##no critic(ArgUnpacking)
241
242212µs17µs my %assignment_ops = hashify qw(
# spent 7µs making 1 call to Perl::Critic::Utils::hashify
243 = *= /= += -= %= **= x= .= &= |= ^= &&= ||= <<= >>= //= ++ --
244 );
24538134µs3854µs
# spent 209µs (155+54) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_assignment_operator which was called 38 times, avg 5µs/call: # 38 times (155µs+54µs) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_assignment_to_topic at line 137, avg 5µs/call
sub _is_assignment_operator { return exists $assignment_ops{$_[0]} }
# spent 54µs making 38 calls to PPI::Token::content, avg 1µs/call
246
24712µs12µs my %increment_ops = hashify qw( ++ -- );
# spent 2µs making 1 call to Perl::Critic::Utils::hashify
2481970µs1922µs
# spent 99µs (77+22) within Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_increment_operator which was called 19 times, avg 5µs/call: # 19 times (77µs+22µs) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::_is_assignment_to_topic at line 142, avg 5µs/call
sub _is_increment_operator { return exists $increment_ops{$_[0]} }
# spent 22µs making 19 calls to PPI::Token::content, avg 1µs/call
249
25012µs12µs my %binding_ops = hashify qw( =~ !~ );
# spent 2µs making 1 call to Perl::Critic::Utils::hashify
251 sub _is_binding_operator { return exists $binding_ops{$_[0]} }
252}
253
25419µs1;
255
256#-----------------------------------------------------------------------------
257
258__END__