This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move list of XS keywords to Constants.pm.
authorJames E. Keenan <jkeenan@cpan.org>
Sat, 27 Mar 2010 02:24:15 +0000 (22:24 -0400)
committerSteffen Mueller <smueller@cpan.org>
Tue, 12 Jul 2011 18:53:52 +0000 (20:53 +0200)
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm

index 4159652..53525e1 100644 (file)
@@ -163,12 +163,9 @@ sub process_file {
   my $END = "!End!\n\n";        # "impossible" keyword (multiple newline)
 
   # Match an XS keyword
-  $BLOCK_re = '\s*(' . join('|', qw(
-    REQUIRE BOOT CASE PREINIT INPUT INIT CODE PPCODE
-    OUTPUT CLEANUP ALIAS ATTRS PROTOTYPES PROTOTYPE
-    VERSIONCHECK INCLUDE INCLUDE_COMMAND SCOPE INTERFACE
-    INTERFACE_MACRO C_ARGS POSTCALL OVERLOAD FALLBACK
-    )) . "|$END)\\s*:";
+  $BLOCK_re = '\s*(' .
+    join('|' => @ExtUtils::ParseXS::Constants::keywords) .
+    "|$END)\\s*:";
 
   our ($C_group_rex, $C_arg);
   # Group in C (no support for comments or literals)
index ae07b00..2d6172c 100644 (file)
@@ -29,5 +29,11 @@ our $proto_re     = "[" . quotemeta('\$%&*@;[]') . "]";
 our $Overload     = 0;
 our $errors       = 0;
 our $Fallback     = '&PL_sv_undef';
+our @keywords     = qw( 
+  REQUIRE BOOT CASE PREINIT INPUT INIT CODE PPCODE
+  OUTPUT CLEANUP ALIAS ATTRS PROTOTYPES PROTOTYPE
+  VERSIONCHECK INCLUDE INCLUDE_COMMAND SCOPE INTERFACE
+  INTERFACE_MACRO C_ARGS POSTCALL OVERLOAD FALLBACK
+);
 
 1;