From: Steve Hancock Date: Sun, 22 Mar 2020 18:12:57 +0000 (-0700) Subject: fix a few additional [_A-Za-z] matches X-Git-Tag: 20200619~123 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1a42325516b767a46078ba64ad94433ff6d55002;p=perltidy.git fix a few additional [_A-Za-z] matches --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index b69e776f..40f70123 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -2273,7 +2273,8 @@ sub prepare_for_a_new_file { # because we also have to be sure that previous token is # a type character ($,@,%). if ( $last_nonblank_token eq '{' - && ( $next_tok =~ /^[A-Za-z_]/ ) ) + && ( $next_tok !~ /^\d/ ) + && ( $next_tok =~ /^\w/ ) ) { if ( $next_tok eq 'W' ) { @@ -4279,7 +4280,7 @@ sub operator_expected { if ( $last_nonblank_type eq 'Z' ) { # angle.t - if ( $last_nonblank_token =~ /^[A-Za-z_]/ ) { + if ( $last_nonblank_token =~ /^\w/ ) { $op_expected = UNKNOWN; }