From f2b8889d2acc51fdfdd9560715f4339a41ad6988 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 10 Sep 2020 16:32:34 -0700 Subject: [PATCH] Fixed problem identifying pod in __DATA__ and __END__ sections --- lib/Perl/Tidy/Tokenizer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5