Re: What to do about L<Foo Bar> and L<"Foo Bar">

[email protected] (Ron Savage) Tue, 29 May 2018 15:20:34 +1000
Newsgroups perl.pod-people
Message-ID <[email protected]>
Hi Karl

See below.

On 29/05/18 13:49, Karl Williamson wrote:
> podspec says this:
> 
> Previous versions of perlpod allowed for a "L<section>" syntax (as in
> "L<Object Attributes>"), which was not easily distinguishable from
> "L<name>" syntax and for "L<"section">" which was only slightly less
> ambiguous. This syntax is no longer in the specification, and has been
> replaced by the "L</section>" syntax (where the slash was formerly
> optional). Pod parsers should tolerate the "L<"section">" syntax, for
> a while at least. The suggested heuristic for distinguishing
> L<section>" from "L<name>" is that if it contains any whitespace,
> it's a section. Pod processors should warn about this being deprecated
> syntax.
> 
> Pod:Simple accepts these without complaint.
> 
> If I change things to complain, a bunch of things in the perl core are 
> found to be in violation, even of the deprecated syntax.
> 
> The question is what to do?
> 
> 1) We could leave things as they always have been, to let sleeping dogs 
> lie.  It's worked for so long that we're not seriously going to stop 
> accepting these.

This pretends things have not changed when in fact they have, so not my 
preference.

> 2) Raise the warnings, either on both cases or just the deprecated

Raise warnings on deprecated structures, so uses can fix problems, is my 
choice here.

> 3) Don't raise warnings, but change Pod::Checker to do so, under the 
> theory that you won't be using that unless you want to know the iffy 
> things.  Maybe make the deprecated come out always, and the tolerated 
> only for level 2 warnings.

This imposes a burden on users. Tasks: (a) Change to Pod::Checker, to 
find problems; (b) Fix problems. Not my preference since it's simpler 
for the end user to find the same problems under (2).

> I'm leaning towards option 3).

-- 
Ron Savage - savage.net.au