File Coverage

blib/lib/ExtUtils/ParseXS/Constants.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package ExtUtils::ParseXS::Constants;
2 24     24   175 use strict;
  24         47  
  24         968  
3 24     24   150 use warnings;
  24         55  
  24         1155  
4 24     24   2888 use Symbol;
  24         10934  
  24         7097  
5              
6             our $VERSION = '3.61';
7              
8             =head1 NAME
9              
10             ExtUtils::ParseXS::Constants - Initialization values for some globals
11              
12             =head1 SYNOPSIS
13              
14             use ExtUtils::ParseXS::Constants ();
15              
16             $PrototypeRegexp = $ExtUtils::ParseXS::Constants::PrototypeRegexp;
17              
18             =head1 DESCRIPTION
19              
20             Initialization of certain non-subroutine variables in ExtUtils::ParseXS and some of its
21             supporting packages has been moved into this package so that those values can
22             be defined exactly once and then re-used in any package.
23              
24             Nothing is exported. Use fully qualified variable names.
25              
26             =cut
27              
28             # Note that to reduce maintenance, $PrototypeRegexp is used
29             # by ExtUtils::Typemaps, too!
30             our $PrototypeRegexp = "[" . quotemeta('\$%&*@;[]_') . "]";
31              
32             # These are all the line-based keywords which can appear in an XS file,
33             # except MODULE and TYPEMAP, which are handled specially by fetch_para()
34             # and are thus never seen by the parser.
35             # It also doesn't include non-line-based keywords such as
36             # IN_OUT, NO_INIT, NO_OUTPUT.
37             # This list is mainly used by the parser to delineate blocks (such as
38             # blocks of CODE or lines of INPUT).
39              
40             our @XSKeywords = qw(
41             REQUIRE BOOT CASE PREINIT INPUT INIT CODE PPCODE
42             OUTPUT CLEANUP ALIAS ATTRS PROTOTYPES PROTOTYPE
43             VERSIONCHECK INCLUDE INCLUDE_COMMAND SCOPE INTERFACE
44             INTERFACE_MACRO C_ARGS POSTCALL OVERLOAD FALLBACK
45             EXPORT_XSUB_SYMBOLS
46             );
47              
48             our $XSKeywordsAlternation = join('|', @XSKeywords);
49              
50              
51             # keywords which can appear anywhere within an XSUB.
52              
53             our $generic_xsub_keywords_alt = 'ALIAS|ATTRS|OVERLOAD|PROTOTYPE';
54              
55             1;