# a pattern cannot follow certain keywords which take optional
# arguments, like 'shift' and 'pop'. See also '?'.
- if ( $last_nonblank_type eq 'k'
+ if (
+ $last_nonblank_type eq 'k'
&& $is_keyword_rejecting_slash_as_pattern_delimiter{
- $last_nonblank_token} )
+ $last_nonblank_token}
+ )
{
$is_pattern = 0;
}
# Patch for rt #126965
# a pattern cannot follow certain keywords which take optional
# arguments, like 'shift' and 'pop'. See also '/'.
- if ( $last_nonblank_type eq 'k'
+ if (
+ $last_nonblank_type eq 'k'
&& $is_keyword_rejecting_question_as_pattern_delimiter{
- $last_nonblank_token} )
+ $last_nonblank_token}
+ )
{
$is_pattern = 0;
}
print STDOUT "TOKENIZE:(@debug_list)\n";
};
- # turn off attribute list on first non-blank, non-bareword
- if ( $pre_type ne 'w' ) { $in_attribute_list = 0 }
+ # Turn off attribute list on first non-blank, non-bareword.
+ # Added '#' to fix c038.
+ if ( $pre_type ne 'w' && $pre_type ne '#' ) {
+ $in_attribute_list = 0;
+ }
###############################################################
# We have the next token, $tok.
# /^(\}|\{|BEGIN|END|CHECK|INIT|AUTOLOAD|DESTROY|UNITCHECK|continue|;|if|elsif|else|unless|while|until|for|foreach)$/
elsif (
$is_zero_continuation_block_type{
- $routput_block_type->[$i] } )
+ $routput_block_type->[$i]
+ }
+ )
{
$in_statement_continuation = 0;
}
# /^(sort|grep|map|do|eval)$/ )
elsif (
$is_not_zero_continuation_block_type{
- $routput_block_type->[$i] } )
+ $routput_block_type->[$i]
+ }
+ )
{
}
# // may follow perl functions which may be unary operators
# see test file dor.t (defined or);
- if ( $tok eq '/'
+ if (
+ $tok eq '/'
&& $next_type eq '/'
&& $is_keyword_rejecting_slash_as_pattern_delimiter{
- $last_nonblank_token} )
+ $last_nonblank_token}
+ )
{
$op_expected = OPERATOR;
}
=over 4
+=item B<Fix error parsing sub attributes with side comment>
+
+Testing with side comments produced an error in the following snippet:
+
+ sub plugh () :#
+ Ugly('\(") : Bad;
+
+This is fixed in this update, case c038.
+
+11 Jul 2021.
+
=item B<Fix case b1172, a failure to converge>
Random testing produced case b1172, a failure to converge with unusual parametrs.