X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=opcode.pl;h=01db0252424b509194dddb44ce488bde70fb972e;hb=def9adf2ff7ea35b82919070c285ab8f2ffe1641;hp=08c9e8327fc0eee6b3c7165742b15ca0e90bb96c;hpb=424a4936e3f61f4e8db394f496a116e698cede85;p=p5sagit%2Fp5-mst-13.2.git diff --git a/opcode.pl b/opcode.pl index 08c9e83..01db025 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'; @@ -795,6 +810,7 @@ exists exists ck_exists is% S rv2hv hash dereference ck_rvconst dt1 helem hash element ck_null s2 H S hslice hash slice ck_null m@ H L +boolkeys boolkeys ck_fun % H # Explosives and implosives. @@ -1052,7 +1068,7 @@ hintseval eval hints ck_svconst s$ entereval eval "string" ck_eval d% S leaveeval eval "string" exit ck_null 1 S #evalonce eval constant string ck_null d1 S -entertry eval {block} ck_null | +entertry eval {block} ck_eval d% leavetry eval {block} exit ck_null @ # Get system info.