Adds "Back to Top" links in front of every HEAD1 heading (except for
the first). By default, no backlink are being generated.
+=item cachedir
+
+ --cachedir=name
+
+Creates the item and directory caches in the given directory.
+
=item css
--css=stylesheet
=cut
+my $cachedir = "."; # The directory to which item and directory
+ # caches will be written.
my $cache_ext = $^O eq 'VMS' ? ".tmp" : ".x~~";
my $dircache = "pod2htmd$cache_ext";
my $itemcache = "pod2htmi$cache_ext";
Usage: $0 --help --htmlroot=<name> --infile=<name> --outfile=<name>
--podpath=<name>:...:<name> --podroot=<name>
--libpods=<name>:...:<name> --recurse --verbose --index
- --netscape --norecurse --noindex
+ --netscape --norecurse --noindex --cachedir=<name>
--backlink - set text for "back to top" links (default: none).
+ --cachedir - directory for the item and directory cache files.
--css - stylesheet URL
--flush - flushes the item and directory caches.
--[no]header - produce block header/footer (default is no headers).
END_OF_USAGE
sub parse_command_line {
- my ($opt_backlink,$opt_css,$opt_flush,$opt_header,$opt_help,$opt_htmldir,
- $opt_htmlroot,$opt_index,$opt_infile,$opt_libpods,$opt_netscape,
- $opt_outfile,$opt_podpath,$opt_podroot,$opt_quiet,$opt_recurse,
- $opt_title,$opt_verbose);
+ my ($opt_backlink,$opt_cachedir,$opt_css,$opt_flush,$opt_header,$opt_help,
+ $opt_htmldir,$opt_htmlroot,$opt_index,$opt_infile,$opt_libpods,
+ $opt_netscape,$opt_outfile,$opt_podpath,$opt_podroot,$opt_quiet,
+ $opt_recurse,$opt_title,$opt_verbose);
unshift @ARGV, split ' ', $Config{pod2html} if $Config{pod2html};
my $result = GetOptions(
'backlink=s' => \$opt_backlink,
+ 'cachedir=s' => \$opt_cachedir,
'css=s' => \$opt_css,
'flush' => \$opt_flush,
'header!' => \$opt_header,
@libpods = split(":", $opt_libpods) if defined $opt_libpods;
$backlink = $opt_backlink if defined $opt_backlink;
+ $cachedir = $opt_cachedir if defined $opt_cachedir;
$css = $opt_css if defined $opt_css;
$header = $opt_header if defined $opt_header;
$htmldir = $opt_htmldir if defined $opt_htmldir;
warn "Flushing item and directory caches\n"
if $opt_verbose && defined $opt_flush;
+ $dircache = "$cachedir/pod2htmd$cache_ext";
+ $itemcache = "$cachedir/pod2htmi$cache_ext";
unlink($dircache, $itemcache) if defined $opt_flush;
}