Author: kwilliams
Date: Tue Dec 26 20:59:46 2006
New Revision: 8471

Modified:
   Module-Build/trunk/Changes
   Module-Build/trunk/lib/Module/Build/Base.pm

Log:
Use delete_filetree(), not unlink()

Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes  (original)
+++ Module-Build/trunk/Changes  Tue Dec 26 20:59:46 2006
@@ -1,5 +1,8 @@
 Revision history for Perl extension Module::Build.
 
+ - Avoid an unlink() error on OS/2 when fixing shebang lines. [Ilya
+   Zakharevich]
+
  - When we're protecting the world from the evils of long RedHat
    $ENV{PERL5LIB} variables, don't assume $ENV{PERL5LIB} is already
    defined. [Dave Rolsky]

Modified: Module-Build/trunk/lib/Module/Build/Base.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Base.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Base.pm Tue Dec 26 20:59:46 2006
@@ -2350,7 +2350,7 @@
     rename("$file.new", $file)
       or die "Can't rename $file.new to $file: $!";
     
-    unlink "$file.bak"
+    $self->delete_filetree("$file.bak")
       or $self->log_warn("Couldn't clean up $file.bak, leaving it there");
     
     $self->do_system($c->get('eunicefix'), $file) if $c->get('eunicefix') ne 
':';

Reply via email to