Subject: | Tab detection breaks with malformed POD |
Malformed POD in one file will break tab-detection in following files.
This is due to the bistable operator getting jammed in the wrong
position across files. I made the following change, which appeared to
work:
74c74
< next if (/^\s*=.+/ .. (/^\s*=(cut|back|end)/ || eof($fh)));
---
Show quoted text
> next if (/^\s*=.+/ .. /^\s*=(cut|back|end)/);
This was intended to provide a catch at the end of a file, so that the
condition resets. To reproduce, put tabs in file2.pl, and fail to end a
POD in file1.pl.
file1.pl:
#!/usr/bin/perl
=head1 This is POD
Tabs here are ignored
See what I mean
file2.pl:
#!/usr/bin/perl
Ooops, a tab!
1;
Without this, if a POD is not properly ended by =cut/=back/=end, the
operator remains in force, skipping lines, even in subsequent files.
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
Commit id: b7b3ac231a23ed1cc1b90a1ade1bad9fe28d847e
osname=MSWin32, osvers=5.1, archname=MSWin32-x86-perlio