Re: How to extract all Pod from a module

[email protected] (Olaf Alders)
Newsgroups perl.pod-people
Message-ID <[email protected]>
On 2011-02-02, at 2:03 PM, Olaf Alders wrote:

> Hi Folks,
> 
> I'm working on the CPAN-API project (https://github.com/CPAN-API/cpan-api/wiki/API-docs) and part of that involves Pod formatting etc.  Could someone point me towards a simple way for me to extract all of the Pod out of a module? I'm already using several modules to deal with Pod, but I haven't seen any easy solution for just getting all of the Pod out of a file or string.


I've actually found a workable solution:

use Pod::POM;
use Pod::POM::View::Pod;
 
my $parser = Pod::POM->new();
 
my $pom = $parser->parse_file($filename) || die $parser->error();
print Pod::POM::View::Pod->print($pom);


--
Olaf Alders
[email protected]

http://www.wundersolutions.com
http://twitter.com/wundercounter

866 503 2204 (Toll free - North America)
416 944 8306 (direct)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.