I saw Chris Laco's post about Pod::POM::Web this evening and decided to try it out. Pod::POM::Web is a handy web app that converts POD to HTML on the fly for any Perl module installed in @INC on your machine. POM is short for POD Object Model[1], in analogy to a DOM.
The preferred mode of operation seems to be mod_perl 2, which is a no-go on my Mac which ships with Apache 1.3 and mod_perl 1. So I decided to try the standalone mode. I captured a PNG screenshot in Firefox. It's POD rendering/css is not nearly as pretty as search.cpan.org but wow is it fast and useful! I'm in love already.
The standalone mode has a few bugs that I wrote patches to fix. Furthermore, I wrote a quick CGI program that launches the standalone server if it isn't already running:
#!/usr/bin/perl -w
use strict; use CGI; use LWP::Simple qw(get);
my $podurl = 'http://localhost:8080/'; if (!get($podurl)) { require Net::Server::Daemonize; require Pod::POM::Web; if (!Net::Server::Daemonize::safe_fork()) { Net::Server::Daemonize::daemonize('www', 'www'); open STDOUT, '>>', '/var/log/pod-pom-web.log'; open STDERR, '>&STDOUT'; Pod::POM::Web->server; exit 0; } sleep 2; } print CGI->redirect($podurl);