Close the file before renaming it. Problem spotted and fix supplied by corion.
Nicholas Clark [Tue, 31 Mar 2009 20:15:53 +0000 (21:15 +0100)]
ext/Errno/Errno_pm.PL

index 424f0f3..dc8eaba 100644 (file)
@@ -40,6 +40,8 @@ else {
 }
 write_errno_pm();
 unlink "errno.c" if -f "errno.c";
+close OUT or die "Error closing Errno.tmp: $!";
+select STDOUT;
 rename "Errno.tmp", "Errno.pm" or die "Cannot rename Errno.tmp to Errno.pm: $!";
 
 sub process_file {