This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
concat interacts badly with magic
[perl5.git] / keywords.pl
index b54d85a..fe745d4 100755 (executable)
@@ -1,9 +1,28 @@
 #!/usr/bin/perl
 
-unlink "keywords.h";
+require 'regen_lib.pl';
+safer_unlink ("keywords.h");
 open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n";
+binmode KW;
 select KW;
 
+print <<EOM;
+/* -*- buffer-read-only: t -*-
+ *
+ *    keywords.h
+ *
+ *    Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
+ *    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.
+ *
+ * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
+ *  This file is built by keywords.pl from its data.  Any changes made here
+ *  will be lost!
+ */
+EOM
+
 # Read & print data.
 
 $keynum = 0;
@@ -15,6 +34,10 @@ while (<DATA>) {
     print &tab(5, "#define KEY_$keyword"), $keynum++, "\n";
 }
 
+print KW "\n/* ex: set ro: */\n";
+
+close KW or die "Error closing keywords.h: $!";
+
 ###########################################################################
 sub tab {
     local($l, $t) = @_;
@@ -35,13 +58,8 @@ BEGIN
 CORE
 DESTROY
 END
-EQ
-GE
-GT
-LE
-LT
-NE
-RESTART
+INIT
+CHECK
 abs
 accept
 alarm
@@ -83,6 +101,7 @@ endpwent
 endservent
 eof
 eq
+err
 eval
 exec
 exists
@@ -166,6 +185,7 @@ open
 opendir
 or
 ord
+our
 pack
 package
 pipe
@@ -177,6 +197,7 @@ prototype
 push
 q
 qq
+qr
 quotemeta
 qw
 qx