From: Steve Hancock Date: Mon, 14 Sep 2020 02:05:32 +0000 (-0700) Subject: improved hash-bang warning filter X-Git-Tag: 20200907.01~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fa84904c04d887e5148c7b7b833877612ae88a48;p=perltidy.git improved hash-bang warning filter --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 99dd2619..c48abc14 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -824,9 +824,9 @@ sub get_line { ) && !$tokenizer_self->[_look_for_hash_bang_] - # Patch: be sure there is a slash after the #! before giving a - # warning - && $input_line =~ /^\#\!\s*\/.*perl\b/ + # Patch: be sure there is either a slash or the word 'perl' + # after the #! before giving a warning. + && $input_line =~ /^\#\!\s*(\/|perl)/ ) {