diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-03-17 00:17:26 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-03-17 00:17:26 +0000 |
commit | 08858ed21b9a4d448437bdae35df5c42fbe1c8bd (patch) | |
tree | d27bb2954cf830c9866eaa74e228a0a358b0d119 /opcode.pl | |
parent | 424a4936e3f61f4e8db394f496a116e698cede85 (diff) | |
download | perl-08858ed21b9a4d448437bdae35df5c42fbe1c8bd.tar.gz |
Drag autodoc.pl and overload.pl into the age of safer_open().
Thanks to the wisdom of london.pm, stuff the filename into the SCALAR
slot of the typeglob created in safer_open(), so that ...
Add safer_close(), that will die (with the filename) if the close
fails.
p4raw-id: //depot/perl@33539
Diffstat (limited to 'opcode.pl')
-rwxr-xr-x | opcode.pl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -438,8 +438,8 @@ sub gen_op_is_macro { print $oc "/* ex: set ro: */\n"; print $on "/* ex: set ro: */\n"; -close $oc or die "Error closing $opcode_new: $!\n"; -close $on or die "Error closing $opname_new: $!\n"; +safer_close($oc); +safer_close($on); rename_if_different $opcode_new, 'opcode.h'; rename_if_different $opname_new, 'opnames.h'; @@ -487,8 +487,8 @@ for (@ops) { print $pp "\n/* ex: set ro: */\n"; print $ppsym "\n# ex: set ro:\n"; -close $pp or die "Error closing pp_proto.h-new: $!\n"; -close $ppsym or die "Error closing pp.sym-new: $!\n"; +safer_close($pp); +safer_close($ppsym); rename_if_different $pp_proto_new, 'pp_proto.h'; rename_if_different $pp_sym_new, 'pp.sym'; |