diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-01-23 07:35:47 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-01-23 07:35:47 +0000 |
commit | 60fee4d1101d4805dfd32099980441e9d9982565 (patch) | |
tree | 5228447ccbe5b17d65aa1696bfd00f358fe6c74c /regen/overload.pl | |
parent | 78102347e0341b1cd4795accd0ca5ff1f2621bb2 (diff) | |
download | perl-60fee4d1101d4805dfd32099980441e9d9982565.tar.gz |
regen/overload.pl should use rename_if_different() for lib/overload/numbers.pm
It was the only file generated by any of the regen/*.pl scripts which was
always written out directly, instead of first creating a temporary file, and
only moving that if successfully generated (and different).
Diffstat (limited to 'regen/overload.pl')
-rw-r--r-- | regen/overload.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regen/overload.pl b/regen/overload.pl index 343629f81c..d01348a01f 100644 --- a/regen/overload.pl +++ b/regen/overload.pl @@ -30,11 +30,10 @@ while (<DATA>) { push @names, $name; } -safer_unlink ('lib/overload/numbers.pm'); my $c = safer_open("overload.c-new"); my $h = safer_open("overload.h-new"); mkdir("lib/overload", 0777) unless -d 'lib/overload'; -my $p = safer_open('lib/overload/numbers.pm'); +my $p = safer_open('lib/overload/numbers.pm-new'); select $p; @@ -135,6 +134,7 @@ safer_close($c); safer_close($p); rename_if_different("overload.c-new", "overload.c"); rename_if_different("overload.h-new","overload.h"); +rename_if_different('lib/overload/numbers.pm-new', 'lib/overload/numbers.pm'); __DATA__ # Fallback should be the first |