develooper Front page | perl.perl5.porters | Postings from February 2000

Re: proposed perlpod.pod patch

Thread Previous | Thread Next
From:
Brad Appleton
Date:
February 4, 2000 15:50
Subject:
Re: proposed perlpod.pod patch
Message ID:
200002042350.RAA23026@agogic.cig.mot.com
On Fri, Feb 04, 2000 at 03:29:20PM -0800, Larry Wall wrote:
> Brad Appleton writes:
> : If the consensus is that the newline limitation must be removed for
> : the [A-Z]<<\s+...\s+>> case I can do that, but it will cost a little
> : bit in performance. I can see how keeping the limitation could bite
> : those of us that use an editor or other tool to autoformat/wrap textlines
> 
> Why can't all newlines be turned into spaces earlier in the process?

Thats a fine thing for one of the pod2xxx translators to do, but it
would be a great big no-no for Pod::Parser. Pod::Parser must not
modify the text in any such manner. It must parse it, and hand it
over the the callbacks _as_ _is_ with all original text intact, just
tokenized appropriately. Some of the filters and other modules that use
Pod::Parser don't do any kind of pod2xxx translation at all. They merely
use Pod::Parser to do some filtering of sections, but the sections
they want need to appear as is in the output without being munged by
Pod::Parser, that is for the caller to do. If Pod::Parser did it, it would
break existing code (probably not anything in the core mind you, but it
would certainly break the code of some of my users that count on it not
modifying any text, only presenting what was parsed in appropriately
"chunked" snippets).

Remember that not all uses of Pod::Parser are limited to pod->???
translation. There is non-negligible code out there that does other
things.  For example, if you were to invoke Pod::Parser::parse_from_file
and *not* override any methods, the result should be only the POD sections
of the input file. Any source or non-POD sections would not be there,
but all the PODS would be, and they must look identical to the way the
appeared on input.  Pod::Select and podselect need this as well. And I
think it would wreak some havoc with Pod::Chcker too, though Marek would
probably be able to cope with it ;-)

-- 
Brad Appleton <bradapp@enteract.com> http://www.enteract.com/~bradapp/
  "And miles to go before I sleep." -- Robert Frost

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About