Rename safer_rename() to rename_if_different(), to accurately describe
authorNicholas Clark <nick@ccl4.org>
Sat, 15 Mar 2008 18:37:34 +0000 (18:37 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 15 Mar 2008 18:37:34 +0000 (18:37 +0000)
commit424a4936e3f61f4e8db394f496a116e698cede85
treee19475f64cd932d850b6975251ee284844aaf0d8
parentb6b9a09997c80269af874aff41936e014ed728f7
Rename safer_rename() to rename_if_different(), to accurately describe
what it does. Use File::Compare rather than Digest::MD5, as the files
are small enough to simply read in. (File::Compare dates from 5.004)
Remove safer_rename_always(), which isn't used.
DRY by replacing the cargo-culted "open or die" with a new function
safer_open(), which uses Gensym (5.002) to create an anonymous file
handle, and opens and binmodes the file, or dies.
This necessitates replacing bareword file handles with lexicals in all
the callers.
Correct the names of files in close or die constructions.

p4raw-id: //depot/perl@33538
embed.pl
keywords.pl
opcode.pl
reentr.pl
regcomp.pl
regen_lib.pl
warnings.pl