Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

gnat (29)

  (email not shown publicly)

Journal of gnat (29)

Wednesday September 10, 2003
12:00 PM

POD modules

[ #14631 ]
Rael asked today how to convert a POD file to HTML from his program. He couldn't believe that he had to write and read temporary files. I checked and that's still the case, even on 5.8. I was surprised at how bastard-redhaired-stepchild the POD support has been. I now take back every single eye roll and tolerant sigh I quietly gave when Brad Appleton, Matt Sergeant, and TorgoX submitted patches to P5P.

At the same time, of course, I did basically say to Rael that he should suck it up and stop being a wuss. Temporary files are nothing to be ashamed of. "Consider it a harkening back to the roots of Unix," I said. Judging from his tight-lipped silence, he's not feeling particularly nostalgic right now :-)


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • POD - HTML (Score:3, Interesting)

    I talked to Rael about this last night in AIM, too. The best I could offer was "pod2html < foo.pod > foo.html".

    pod2html is just a wrapper around Pod::Html, and it shows. The entire module is really a shell script. Look at the script and you'll see. Flag-parsing is part of the module. :-(

    It may have been fine years ago, but now we want to do those sorts of translations on the fly, instead of converting great masses of docs. It's time for that change.

    Speaking of changing Pod to HTML on the fly, see my update to Apache::Pod. I got a mighty swell patch to have it support stylesheets.



  • Pod::Simple::HTML (Score:4, Informative)

    by autarch (914) on 2003.09.10 14:00 (#24096) Homepage Journal

    my $p = Pod::Simple::HTML->new;
    my $html = $p->parse_file(...);
    # or ...
    my $html = $p->parse_string_document(...);

  • Pod::Simple::HTML (Score:3, Informative)

    by ask (83) <> on 2003.09.11 2:01 (#24111) Homepage Journal
    As David pointed out, you gave a bad reply to him.

    In Combust [] we use Pod::Simple to parse a POD document as provided by Template Toolkit and parse it into a Template Toolkit document []. Certainly no tmp files and it works very well. :-)

      - ask

    -- ask bjoern hansen [], !try; do();

    • In Rael's case, he's looking for something that ships with Perl as most of his audience are people who don't know how to (or don't want to know how to) install modules from CPAN. Pod::Simple::HTML is nice, but it's depressing that this has to be something in a CPAN module and that it's taken regular joes like me zillions of years to realize that duh if POD is part of the Perl parser, maybe decent modules to parse POD should be part of Perl?

      He could ship blosxom with Pod::Simple and Pod::Simple::HTML but

  • I've had a lot of success with Pod::POM [] and TT [].

    /me realises that's something else we forgot to cover in the book :-/

    • No no no, pass it off as part of the Grand Scheme: if you intentionally leave some of the good stuff out of the book, then you guarantee yourself an audience for the inevitable sequel. Planned obsolescence! Marketing! It is all as Forseen By Prophesy.


  • by Matts (1087) on 2003.09.12 6:53 (#24144) Journal
    But this was one of the main goals of Pod::SAX - to use the standard SAX API for accepting basically anything you can pass to it - a filename, a filehandle or a scalar.

    Unfortunately people didn't like Pod::SAX because it a) made people think of XML, and b) wasn't very well documented. So along came Pod::Simple which mostly fixes those two bugs.

    Plus I think people didn't really understand the benefits of using something like SAX - the multitude of modules you could then use for generating different format content. Shame really.