Right. Now I remember old threads where people would argue that POD parsers 
should do exactly the same as the Perl parser - and IIRC the conclusion was 
that using something like PPI to handle "pathological" cases like multiline 
strings or here docs would be an overkill, so POD is what starts with a (valid) 
POD directive. The only thing that perhaps could be changed is to skip a 
__DATA__ section (but keep parsing since there may be POD behind __END__ !)

I see a potential way of resolving this, but it looks like quite a big effort: 
the Perl parser could store all text it skips as POD in a similar structure 
like __DATA__ so that POD parsing utilities could use a pseudo-filehandle like 
this (reading POD for the current script):

while (<main::__POD__>) {
...
}

and for other files there could be a special open() discipline to return only 
POD using the same parser. What do you think?

-Marek


Von meinem Samsung Galaxy Smartphone gesendet.


-------- Ursprüngliche Nachricht --------
Von: Randy Stauner <rwstau...@cpan.org> 
Datum:08.01.2015  19:26  (GMT+01:00) 
An: "David E. Wheeler" <da...@justatheory.com> 
Cc: Marek Rouchal <ma...@rouchal.net>, Karl Williamson 
<pub...@khwilliamson.com>, pod-people@perl.org 
Betreff: Re: Pod::Simple can treat binary as pod due to liberal/inconsistent 
regexp patterns 

Reply via email to