]> git.donarmstrong.com Git - perltidy.git/commitdiff
Fixed problem identifying pod in __DATA__ and __END__ sections
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 10 Sep 2020 23:32:34 +0000 (16:32 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 10 Sep 2020 23:32:34 +0000 (16:32 -0700)
lib/Perl/Tidy/Tokenizer.pm

index 380f7d29a07c93153655a55bbc7f982196ccb527..f6dcac0b6b83622b56808f910b1eb79ddf1377d6 100644 (file)
@@ -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;