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