Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: RFC: Pod::Remove

by IlyaM (Parson)
on Mar 13, 2003 at 11:34 UTC ( #242654=note: print w/ replies, xml ) Need Help??

in reply to RFC: Pod::Remove

Pod::Stripper is based on Pod::Parser, which works mainly on input- and output-streams, i.e. files or filehandles. Which makes it really hard to capture the result in a string.

In Perl >= 5.8.0 it is not a problem:

# opens filehandle to "in memory" files held in Perl scalars open($fh,'>', \$variable);

In Perl < 5.8.0 you can use IO::Scalar to do the same thing.

Another comment: why not patch existing module to do what you want instead of creating yet another CPAN module?

Ilya Martynov,
Quality Perl Programming and Unix Support UK managed @ offshore prices -
Personal website -

Comment on Re: RFC: Pod::Remove
Download Code
Replies are listed 'Best First'.
Re: Re: RFC: Pod::Remove
by domm (Chaplain) on Mar 13, 2003 at 12:06 UTC
    Firstly, thanks for the feedback.

    Secondly: I'm (still) using 5.6.1 and did't know of the feature you mentioned. Using IO::Scalar might also be feasable.

    Another comment: why not patch existing module to do what you want instead of creating yet another CPAN module?

    Pod::Parser seems rather complex, so I thought patching it to return a scalar instead of writing to a FILEHANDLE would be hard. Passing an IO::Scalar-FH (or adding some methods to Pod::Parser that implement this) might be a good idea.

    On the other hand, Pod::Parser seems like a little bit of overkill, if all I want to do is remove POD.

    I'll give it a thought, and talk to Marek Rouchal about patching Pod::Parser.


    Marek suggested using Pod::Simple, as "therein lies the future" (his words). So I'll take a look there...

    -- #!/usr/bin/perl for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://242654]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2016-02-07 17:56 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (256 votes), past polls