Here's what I use:

UPDATE I've added code to handle .pod files as well as .pm files. This means you can put Pod::perl or Pod::perlreftut in the query box to see the HTML equivalents of "perldoc perl" etc. You can also see a directory listing of the Pod:: hierarchy (or any hierarchy) by putting a slash after th the hierarchy name (e.g. mod=Pod/ will display a clickable list of pods in the Pod::* hierarchy).

#!perl -w # # by Jeff Zucker # # may be freely modified and distributred under the same terms as Perl + itself # use strict; use CGI; use CGI::Carp qw/fatalsToBrowser/; use File::Find; use Pod::Html; my $page = new CGI; my $modname = $page->param('mod') || ''; show_form(); if( $modname =~ m#/# ) { show_dir($modname); } else { show_pod( $modname ); } sub show_form { print $page->header, $page->start_html(-title=>'POD FINDER'), $page->start_form, $page->b("Module Name : "), $page->textfield(-name=>'mod'), $page->end_form, $page->end_html, ; } sub show_pod { my $modname = shift; return unless $modname; $modname =~ s#::#/#g; my $filename = findmod( $modname ); pod2html("--quiet","--infile=$filename") if $filename; } sub show_dir { my $dir = shift; $dir =~ s#/$##g; my $scriptname = $page->script_name; for(@INC){ my $fdir = "$_/$dir"; if( -d $fdir ) { opendir(D,$fdir) || die $!; my @files = readdir D; closedir D; for(@files) { next unless /(.*)\.(pm|pod)$/i; print "<a href='$scriptname?mod=$dir\:\:$1'>$dir\:\:$1 +</a><br>"; } } } return ''; } sub findmod { my $mod = shift; if (-e $mod ) { return $mod; } for(@INC){ my $modname = "$_/$mod.pm"; if( -e $modname ) { return $modname; } $modname = "$_/$mod.pod"; if( -e $modname ) { return $modname; } } return ''; } __END__

In reply to A CGI to read PODS (was Re: CGI perldoc with pod2htm) by jZed
in thread CGI perldoc with pod2htm by hmerrill

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.