#!/usr/bin/perl -w
+#
+# Regenerate (overwriting only if changed):
+#
+# opcode.h
+# opnames.h
+# pp_proto.h
+# pp.sym
+#
+# from information stored in the DATA section of this file, plus the
+# values hardcoded into this script in @raw_alias.
+#
+# Accepts the standard regen_lib -q and -v args.
+#
+# This script is normally invoked from regen.pl.
+
use strict;
BEGIN {
* opnames.h
*
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- * 2007 by Larry Wall and others
+ * 2007, 2008 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
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';
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';