[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: pod bugs
*** Philip Newton <newton@newton.digitalspace.net> writes:
> > Correction, that should be /^\s*$/ above (my apologies)
>
> More likely /^\s+$/, since '' matches /^\s*$/ but *is* a blank line,
> so doesn't have to be treated the same as one.
It was definitely supposed to be /^\s*$/ ('*' and not '+') because
that is what actually appears in the code; and the term "blank line"
from the perlpod(1) pages is apparently open to interpretation (some
regard a "blank line" as different from an "empty line" as different
from who knows what else).
*** Tom Christiansen <tchrist@chthon.perl.com> writes:
> By hacking the translators, you don't help those who use $/ = '' to
> parse pod. This is easy and desirable, and you're just encouraging its
> breakage.
This issue was brought up on P5P back before I implemented it the current
way in Pod::Parser (and I also had much private correspondence on the
matter with KJALB). Consensus (which by no means implies unanimity) was
that while it's a nice idea to actually use $/ = '' to parse pod paragraph
at a time, it turns out not to work all the time (even if no one ever uses
a line containing only /^\s+$/ as a paragraph separator - I forget what
some of the other cases mentioned were, but I do remember they existed).
Turns out that the only way to get it "really" right in the general
case is to still parse line-by-line and not paragraph by paragraph
(even though it would be nice to do the latter). It was also deemed
necessary/preferable because folks wanted to see error/warning msgs
that included line numbers as opposed to paragraph numbers (though
that could be done by splitting into lines _after_ parsing by paragraph)
> I hope that these non-paragraph paragraphs give mandatory
> warnings so they'll be fixed.
I heartily support having Pod::Checker issue a warning message for
lines matching /^\s+$/
*** JVromans@squirrel.nl (Johan Vromans) writes:
> If those who want to parse pod use a standard parser like Pod::Parser,
> and Pod::Parser knows how to deal with blank lines, all problems are
> over.
Thats the plan :-)
--
Brad Appleton <bradapp@enteract.com> http://www.enteract.com/~bradapp/
"And miles to go before I sleep." -- Robert Frost
- References to:
-
Tom Christiansen <tchrist@chthon.perl.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]