ExtUtils-ParseXS
view release on metacpan or search on metacpan
lib/ExtUtils/ParseXS/Node.pm view on Meta::CPAN
next;
}
my $file_scoped_keywords =
"BOOT|REQUIRE|PROTOTYPES|EXPORT_XSUB_SYMBOLS|FALLBACK"
. "|VERSIONCHECK|INCLUDE|INCLUDE_COMMAND|SCOPE|TYPEMAP";
# Die if the next line is indented: all file-scoped things (CPP,
# keywords, XSUB starts) are supposed to start on column 1
# (although see the comment below about multiple parse_keywords()
# iterations sneaking in indented keywords).
#
if ($pxs->{line}[0] =~ /^\s/) {
# Try to customise the error message based around why this
# line is indented, to better hint to the user what the
# problem is.
if ($pxs->{line}[0] =~ /^\s+($file_scoped_keywords)\s*:/) {
$pxs->death(
"Error: file-scoped keywords should not be indented");
( run in 0.693 second using v1.01-cache-2.11-cpan-71847e10f99 )