Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org


Comment on Re: RFC: Pod::Remove
Download Code
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.

    UPDATE

    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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-12-29 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (185 votes), past polls