#! perl -w
###########################################################
# Just a quick and dirty utility to search for POD that
# hasn't been converted to HTML by an install or was simply
# unzipped or copied into the site or lib subdirectories.
# Checks to see if an existing .html version of the POD
# exists, if not converts it to HTML. After conversion the
# AS Docs TOC is rebuilt so that all newly added docs are listed.
use strict;
use Pod::Html;
use Pod::Find qw(pod_find);
use ActivePerl::DocTools;
use File::Path;
my $infile_path_root = "c:/perl";
my $outfile_path_root = "c:/perl/html";
my $logfile = "c:/perl/allpod.txt";
open LOGFILE, ">>$logfile" || die "couldn't open LOGFILE $logfile\n";
&search_for_pod;
print LOGFILE "-" x 60, "\n";
close LOGFILE;
ActivePerl::DocTools::WriteTOC();
sub search_for_pod {
my %pods = pod_find({ -verbose => 0, -inc => 1 });
foreach(sort keys %pods) {
convert_pod($_);
}
}
sub convert_pod {
my $podfile = shift;
$podfile =~ s#\\#/#g;
if ($podfile =~ m!$infile_path_root/(.*)/(\w+)\.p.+$!i) {
my $path = $1;
my $name = $2;
if (! -e "$outfile_path_root/$path/$name\.html") {
mkpath("$outfile_path_root/$path");
pod2html( "--infile=$podfile",
"--outfile=$outfile_path_root/$path/$name.html",
"--podroot=$infile_path_root",
"--podpath=site/lib:lib",
);
print LOGFILE "-- Created $outfile_path_root/$path/$name.h
+tml\n";
}
}
}
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|