On Sun, Aug 17, 2003 at 11:28:21PM -0500, Craig A. Berry wrote:
> -    1 while unlink "pod2htmd.x~~";
> -    1 while unlink "pod2htmi.x~~";
> +    my $cache_ext = $^O eq 'VMS' ? ".tmp" : ".x~~";
> +    1 while unlink "pod2htmd$cache_ext";
> +    1 while unlink "pod2htmi$cache_ext";
>  }

Now I've got a really silly question.  Why is it the more sensible
.tmp on VMS but the rather odd .x~~ on everything else?  That seems
unnecessarily complicated.  Probably .x~~ is from the original pod2html
and the VMS folks added .tmp later on because they can't handle ~ in
filenames.

Anyhow, here's a patch to just make it use the sensible .tmp.

--- lib/Pod/t/pod2html-lib.pl   2003/08/18 08:32:01     1.1
+++ lib/Pod/t/pod2html-lib.pl   2003/08/18 08:32:15
@@ -55,9 +55,8 @@
 
     # pod2html creates these
     1 while unlink $outfile;
-    my $cache_ext = $^O eq 'VMS' ? ".tmp" : ".x~~";
-    1 while unlink "pod2htmd$cache_ext";
-    1 while unlink "pod2htmi$cache_ext";
+    1 while unlink "pod2htmd.tmp";
+    1 while unlink "pod2htmi.tmp";
 }
 
 1;

--- lib/Pod/Html.pm     2003/08/18 08:25:36     1.1
+++ lib/Pod/Html.pm     2003/08/18 08:33:16
@@ -204,9 +204,8 @@
 
 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";
+my $dircache = "pod2htmd.tmp";
+my $itemcache = "pod2htmi.tmp";
 
 my @begin_stack = ();          # begin/end stack
 
@@ -255,8 +254,8 @@
 my $Is83;                       # is dos with short filenames (8.3)
 
 sub init_globals {
-$dircache = "pod2htmd$cache_ext";
-$itemcache = "pod2htmi$cache_ext";
+$dircache = "pod2htmd.tmp";
+$itemcache = "pod2htmi.tmp";
 
 @begin_stack = ();             # begin/end stack
 
@@ -695,8 +694,8 @@
 
     warn "Flushing item and directory caches\n"
        if $opt_verbose && defined $opt_flush;
-    $dircache = "$cachedir/pod2htmd$cache_ext";
-    $itemcache = "$cachedir/pod2htmi$cache_ext";
+    $dircache = "$cachedir/pod2htmd.tmp";
+    $itemcache = "$cachedir/pod2htmi.tmp";
     if (defined $opt_flush) {
        1 while unlink($dircache, $itemcache);
     }



-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Cottleston, Cottleston, Cottleston Pie.
A fish can't whistle and neither can I.
Ask me a riddle and I reply:
"Cottlestone, Cottleston, Cottleston Pie."

Reply via email to