X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/424a4936e3f61f4e8db394f496a116e698cede85..a2ac9a71fd041588f93167970d1121ded5605f26:/opcode.pl diff --git a/opcode.pl b/opcode.pl index 08c9e83..2cc242f 100755 --- a/opcode.pl +++ b/opcode.pl @@ -1,4 +1,19 @@ #!/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 { @@ -132,7 +147,7 @@ print $on <<"END"; * 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. @@ -438,8 +453,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 +502,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';