Hi,

Attached small patch *I think* does the right thing. Certainly, it gets rid of 
the temp file and seems to work OK with my limited testing.

Regards

Mark 

Steve Hay wrote:
> If I run
> 
> pp -i command.ico -o test.exe test.pl
> 
> on the "Hello, world" program (in test.pl), where command.ico is the
> attached Win32 icon file, I find that I get a temporary executable file
> with a name like "parl6z2zdSc.exe" left behind as well as the desired
> "test.exe".
> 
> The temporary file does not get left if I don't specify the -i option on
> the command-line.
> 
> Any ideas how to stop the temporary file getting left? It doesn't have a
> fixed name, so all I can do at the moment in scripts that I have for
> building things is to delete "parl*.exe" and hope that it doesn't catch
> anything unintentional.
> 
> Versions:
> perl-5.8.8
> PAR-0.976
> PAR-Dist-0.25
> PAR-Packer-0.976
> Parse-Binary-0.10
> Win32-Exe-0.11
> 
> 
> ------------------------------------------------------------------------
> 

Index: Packer.pm
===================================================================
--- Packer.pm   (revision 519)
+++ Packer.pm   (working copy)
@@ -1253,6 +1253,7 @@
 
         $self->_fix_console();
         unlink($self->{parl});
+        unlink($self->{orig_parl});
         unlink("$self->{parl}.bak");
         return;
     }

Reply via email to