Whaddaya know, I'm doing this in 5.6 (I use ActiveState's Perl Development Kit to wrap my app up in a nice little (?) .exe file, and I forget whether I have to pay big bucks to upgrade it for 5.8.) That should be the ticket though.
Thanks,
Brig
UPDATE
I took a quick look at the PAR slideshow. Thanks for the pointer.
In the meantime, while upgrading Pod::Html should fix this particular problem, the deeper problem is my avoiding the problem of getting --title=title to work. On first reading the pod2html man page, my attempts at following the instructions failed, but considering the documentation from Pod::Html and its additional option of --backlink I realized that I wanted an automated (vs. command-line) solution to my problem of generating both .htm and .txt files anyway. And that another crack at --title was worthwhile.
Thus, I can put the following script in a folder that contains a program's *_Readme.pod file and put the package file someplace accessible like E:/aa/perl/lib. Double-clicking the script from Windows Explorer rebuilds the .htm and .txt files from whatever I've done with my .pod file. And now I get all those little 'Back to Top' links. :-)
# Creates Readme.htm and Readme.txt files from Readme.pod
use strict;
push @INC, 'E:/aa/perl/lib';
require 'podtools.pl';
my $pod_filename = 'BW_Readme.pod'; # filename of pod input
my $htm_filename = 'BW_Readme.htm'; # filename of htm output
my $title = 'BW123321™ Readme'; # title for the htm window;
# ™ is actually the (TM) symbol
my $txt_filename = 'BW_Readme.txt'; # filename of txt output
podtools::pod2_htm_txt(
$pod_filename,
$htm_filename,
$title,
$txt_filename,
);
and the podtools.pl package file in my E:/aa/perl/lib folder:
package podtools;
use strict;
use Pod::Html;
use Pod::Text;
sub pod2_htm_txt {
# Creates htm and txt files from a given pod file and htm title
my (
$pod_filename,
$htm_filename,
$title,
$txt_filename,
) = @_;
# Build the '.htm' file
pod2html(
"--infile=$pod_filename",
"--outfile=$htm_filename",
"--title=$title",
'--backlink=Back to Top', # implants backlink after =head1
);
# Build the '.txt' file
my $parser = Pod::Text->new (
loose => 1, # prints blank lines after =head1
width => 78,
quotes => 'none',
);
# Read POD from first file and write to second.
$parser->parse_from_file ( $pod_filename, $txt_filename );
}
1;
|