From: Steve Hancock Date: Thu, 10 Sep 2020 23:32:34 +0000 (-0700) Subject: Fixed problem identifying pod in __DATA__ and __END__ sections X-Git-Tag: 20200907.01~20 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f2b8889d2acc51fdfdd9560715f4339a41ad6988;p=perltidy.git Fixed problem identifying pod in __DATA__ and __END__ sections --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 380f7d29..f6dcac0b 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -790,7 +790,7 @@ sub get_line { # Note that the _in_data and _in_end flags remain set # so that we return to that state after seeing the # end of a pod section - if ( $input_line =~ /^=(?!cut)/ ) { + if ( $input_line =~ /^=(\w+)\b/ && $1 ne 'cut' ) { $line_of_tokens->{_line_type} = 'POD_START'; write_logfile_entry("Entering POD section\n"); $tokenizer_self->[_in_pod_] = 1; @@ -809,7 +809,7 @@ sub get_line { # Note that the _in_data and _in_end flags remain set # so that we return to that state after seeing the # end of a pod section - if ( $input_line =~ /^=(?!cut)/ ) { + if ( $input_line =~ /^=(\w+)\b/ && $1 ne 'cut' ) { $line_of_tokens->{_line_type} = 'POD_START'; write_logfile_entry("Entering POD section\n"); $tokenizer_self->[_in_pod_] = 1;