We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e225a34 commit f661536Copy full SHA for f661536
lib/PPI/Statement/Compound.pm
@@ -119,7 +119,7 @@ sub type {
119
if ( $content =~ /^for(?:each)?\z/ ) {
120
$Element = $self->schild(++$p) or return $content;
121
if ( $Element->isa('PPI::Token') ) {
122
- return 'foreach' if $Element->content =~ /^my|our|state\z/;
+ return 'foreach' if $Element->content =~ /^(?:my|our|state)\z/;
123
return 'foreach' if $Element->isa('PPI::Token::Symbol');
124
return 'foreach' if $Element->isa('PPI::Token::QuoteLike::Words');
125
}
0 commit comments