diff options
author | Rajesh Vaidheeswarran <rv@gnu.org> | 2001-04-17 05:35:00 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-18 22:32:23 +0000 |
commit | b42210d7e8be170d487d1f438e31efc8ddff8cd7 (patch) | |
tree | 08a962279ccc60c9d351bb89018026ee7aee1245 /lib/Pod | |
parent | 918522b5e36a7d62f3a840c259f44d787c28c61b (diff) | |
download | perl-b42210d7e8be170d487d1f438e31efc8ddff8cd7.tar.gz |
Fwd: pod2html leaves cache files lying around?
Message-Id: <E14pVdE-0004P0-00@fencepost.gnu.org>
p4raw-id: //depot/perl@9743
Diffstat (limited to 'lib/Pod')
-rw-r--r-- | lib/Pod/Html.pm | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index 43168231f3..e61f29af5b 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -43,6 +43,12 @@ Pod::Html takes the following arguments: 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 @@ -194,6 +200,8 @@ This program is distributed under the Artistic License. =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"; @@ -565,9 +573,10 @@ $usage =<<END_OF_USAGE; 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). @@ -600,14 +609,15 @@ Usage: $0 --help --htmlroot=<name> --infile=<name> --outfile=<name> 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, @@ -635,6 +645,7 @@ sub parse_command_line { @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; @@ -651,6 +662,8 @@ sub parse_command_line { 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; } |