Re: How do I get Pod::Simple to extract pod from its containing file?
[email protected] (Karl Williamson) Wed, 06 Mar 2013 08:39:39 -0700
| Newsgroups | perl.pod-people |
|---|---|
| Message-ID | <[email protected]> |
On 03/06/2013 06:15 AM, Nicholas Clark wrote: > On Tue, Jan 29, 2013 at 11:52:43AM -0700, Karl Williamson wrote: >> On 01/26/2013 08:37 PM, Karl Williamson wrote: >>> On 01/26/2013 07:44 PM, Russ Allbery wrote: >>>> Karl Williamson <[email protected]> writes: >>>>> On 01/26/2013 02:23 PM, Russ Allbery wrote: >>>>>> Karl Williamson <[email protected]> writes: >>>> >>>>>>> With Pod::Parser, you just do >>>>>>> parse_from_file($in_fh, $out_fh) >>>> >>>>>>> and it outputs the pod to $out_fh. Pod::Simple has a method of the >>>>>>> same >>>>>>> name which is supposed to emulate the Pod::Parser method, but when >>>>>>> I run >>>>>>> it, nothing is output. > >>>> Oh! I misunderstood, sorry. parse_from_file() does indeed invoke the >>>> parser with the appropriate actions, but what you meant was that >>>> Pod::Parser's "null" parser, when not subclassed, just printed the POD >>>> back out again, so you could use it as a way to extract the POD from a >>>> file. I believe Pod::Simple's "null" parser does nothing at all, so you >>>> get an empty file. >>>> >>>> Yes. I think that's an incompatibility. >>>> >>> >>> If I turn on DEBUGing, it's doing a lot. Is there some trivial way to >>> extract the pod? >>> >> >> So no one thinks there is a trivial way to get this extraction. Would >> someone make a suggestion as to the easiest way to do so using modules >> that will continue to ship with the Perl 5 core (unlike Pod::Parser)? > > No-one answered this, did they? No > > Is it possible to extract the pod by subclassing Pod::Simple, and the > subclass being a null parser that prints out the Pod that it was given? > > Nicholas Clark > Yes, but I was hoping there was something that is less work, or already done, or done for some other purpose, such as Pod::Checker, and I can re-use the relevant parts.