Branch: refs/heads/davem/xs_fixups
  Home:   https://github.com/Perl/perl5
  Commit: b4b27aa71666260552368f18ca734d3e32bb35e4
      
https://github.com/Perl/perl5/commit/b4b27aa71666260552368f18ca734d3e32bb35e4
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: improve else with no matching if err msg

Add '#': change

    Error: 'else' with no matching 'if' in foo.xs, line 14

to be:

    Error: '#else' with no matching '#if' in foo.xs, line 14

etc.


  Commit: eac172468f86bfe0b2d84fd21a8193478de28d60
      
https://github.com/Perl/perl5/commit/eac172468f86bfe0b2d84fd21a8193478de28d60
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: improve err msg: Unterminated '#if/...

Make this generic error message be more specific:

    Error: Unterminated '#if/#ifdef/#ifndef' in foo.xs, line 15

State what particular variety of #if wasn't terminated, and what line it
started on:

    Error: Unterminated '#ifndef' from line 12 in foo.xs, line 15


  Commit: ca802184d979f067557918b42b2b3844617cefaf
      
https://github.com/Perl/perl5/commit/ca802184d979f067557918b42b2b3844617cefaf
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add Utilities::deathHint() method

There is already a WarnHint() method which prints a warning message
(adding file/lineno) and then appends a hint message in parentheses.
This commit adds a corresponding deathHint() method.

This method will be used in the next commit.

This commit also changes it so that the hint message is wrapped in a
single set of parentheses, rather than each line being individually
wrapped.

So for example, before:

    Warning: no foo at foo.xs, line 7
        (did you forget to add)
        (a foo at the end of the line)
        (or maybe at the start of the next line?)

after:

    Warning: no foo at foo.xs, line 7
      (did you forget to add
       a foo at the end of the line
       or maybe at the start of the next line?)


  Commit: 1e6ae2c1b561d4d91c998fbede775f1a09684555
      
https://github.com/Perl/perl5/commit/1e6ae2c1b561d4d91c998fbede775f1a09684555
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: improve 'not indented' err message

Sometimes the XS parser expects the next line *not* to be indented
(usually while parsing file-scoped items).

If it finds an indented line, it used to die with this error message:

    Code is not inside a function (maybe last function was ended by a
    blank line  followed by a statement on column one?) in foo.xs, line 17

That error message was supposed to be a helpful hint for a common XS
programmer error; however, since it also obscures the *actual* error, it
can be just as confusing.

This commit changes it so that the error message makes clear that the
fault is that the current line is indented when an indented line wasn't
expected, but also gives two different hints depending on whether the
indented thing looks like a file-scoped keyword or not. So for example
this XS code:

    #define FOO 1
      PROTOTYPES: DISABLE

now gives this error message

    Error: file-scoped keywords should not be indented in foo.xs, line 13

This is because before dying, the parser now checks whether the bad line
looks a bit like an indented file-scoped keyword. If it doesn't look
like a keyword, such as:

    #define FOO 1
      blah

then it now gives this error message:

    Error: file-scoped directives must not be indented in foo.xs, line 13
      (If this line is supposed to be part of an XSUB rather than being
       file-scoped, then it is possible that your XSUB has a blank line
       followed by a line starting at column 1 which is being misinterpreted
       as the end of the current XSUB.)

which is an alternative wording of the original hint.


  Commit: 473ef7e364dfe713315ab26a097fd215d7e8a496
      
https://github.com/Perl/perl5/commit/473ef7e364dfe713315ab26a097fd215d7e8a496
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: improve err msg: Didn't find a MODULE ...

Change this warning message from/to:

    Didn't find a 'MODULE ... PACKAGE ... PREFIX' line

    Warning: no MODULE line found in XS file foo.xs

- As it's only a warning, include the 'Warning:' text.

- Include the name of the file.

- It is the lack of a MODULE keyword which is important; whether it
  needs a PACKAGE and PREFIX as well isn't important at this point.


  Commit: cc2ae47bd8e945446c6031246daa0eb644de2390
      
https://github.com/Perl/perl5/commit/cc2ae47bd8e945446c6031246daa0eb644de2390
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: fix warning on unparseable params

When the parameters in an XSUB's signature are unparseable using the
fancy regex which handles (x = ",", y) etc, it's supposed to print a
warning.

However, the code which emits the warning was calling an unknown Warn()
method and dying instead.

Fix and add a test.

(Ideally the signature in the new test aught actually to be parseable,
but that's an issue for another day.)


  Commit: 8e88716eed1fc725ce8d6ec0175a07c4956ab27b
      
https://github.com/Perl/perl5/commit/8e88716eed1fc725ce8d6ec0175a07c4956ab27b
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: avoid spurious CASE error msgs

Since the recent ParseXS refactoring, an XSUB where the first CASE
keyword wasn't at the start of the XSUB was, in addition to the
expected error, generating spurious additional errors. For example:

    int abc(int x, int y)
      INIT:
        myinit
      CASE: x > 0
        CODE:
          code1;
      CASE:
        CODE:
          code2;

just before this commit was outputting all of:

    Error: 'CASE:' after unconditional 'CASE:' in foo.xs, line 16
    Error: no 'CASE:' at top of function in foo.xs, line 16
    Error: no 'CASE:' at top of function in foo.xs, line 19

and after this commit (and also before refactoring) just:

    Error: no 'CASE:' at top of function in foo.xs, line 16


  Commit: 813ce0286e28aaef9176e4a94a5094048c082b0a
      
https://github.com/Perl/perl5/commit/813ce0286e28aaef9176e4a94a5094048c082b0a
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: improve 'definition too short' err msg

When the XS parser finds a line starting on column 1 which isn't a
recognised keyword or CPP directive or similar, it assumes that it must
be the start of a new XSUB. If that line is immediately followed by a
blank line, a fairly cryptic error message is emitted. For example,
these two lines:

    int

    BOO:

cause these two errors to be emitted:

    Error: function definition too short 'int' in foo.xs, line 13
    Error: function definition too short 'BOO:' in foo.xs, line 15

After this commit, the first error message is changed to:

    Error: unrecognised line: 'int' in foo.xs, line 13
      (possible start of a truncated XSUB definition?)

and the second to:

    Error: unrecognised keyword 'BOO' in foo.xs, line 15.

This change acknowledges that an unrecognised line followed by a blank
line may not always be a bad XSUB start. In particular, if it looks like
it might be keyword, albeit an unrecognised one, say so. Otherwise,
emphasise that the line can't be parsed rather than just assuming its a
bad XSUB declaration.

In addition, the reporting method has been changed from blurt() to
death(), so that no more parsing takes place. blurt() is best for
semantic errors, where the basic syntax structure is still ok and
parsing can continue. An unrecognised line means something may have gone
badly wrong, so stop.


  Commit: 9bcdf157740c34e25bb9bf82986960eb38e90864
      
https://github.com/Perl/perl5/commit/9bcdf157740c34e25bb9bf82986960eb38e90864
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add error check for ALIAS and INTERFACE

Only one of ALIAS and INTERFACE should be used per XSUB. Otherwise the
CV's payload is sometimes an integer and sometimes a pointer. So any
generated C code is nonsense. So ban mixing them.


  Commit: ce88c8a13ce4e94783cdbef5ae4a4d4824e72795
      
https://github.com/Perl/perl5/commit/ce88c8a13ce4e94783cdbef5ae4a4d4824e72795
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: detect duplicate INTERFACE names

Previously, something like this silently passed:

    INTERFACE: f1 f1

Make it an error.

Also, remove the unused %map variable from Node::INTERFACE::parse().


  Commit: 3858de066657ea88876f9f1a69d377c016212ba5
      
https://github.com/Perl/perl5/commit/3858de066657ea88876f9f1a69d377c016212ba5
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: test and reword 'length with default' err

There are two types of disallowing of default values with a length(foo)
parameter:

    foo(char *s, int length(s) = 0)
    foo(int length(s), char *s = "")

There are are tests only for the first form. This commit adds a test
for the second, rewords it to make it clearer, and does a proper blurt()
rather than a bare die, so proper file and line numbers are shown.

Before:

    default value not supported with length(NAME) supplied at 
/.../perl-5.43.3.out/lib/5.43.3/ExtUtils/ParseXS/Node.pm line 1416, 
<__ANONIO__> line 15.

After:

    Error: default value for s not allowed when length(s) also present in 
foo.xs, line 14


  Commit: c11a2353c46fb12c8ae2c6936f18ee9e0d2a15a0
      
https://github.com/Perl/perl5/commit/c11a2353c46fb12c8ae2c6936f18ee9e0d2a15a0
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add basic tests for param default values

For some reason I managed not to add any during earlier work expanding
the test suite.


  Commit: cbca9b600a30a973a35aab26806de979d20fd1ca
      
https://github.com/Perl/perl5/commit/cbca9b600a30a973a35aab26806de979d20fd1ca
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: detect missing param default expression

In something like

    void
    foo(int i = )

the XS parser previously silently accepted it and generated broken C
code. Now it dies.


  Commit: 9cd8b9dec65eaab758dd5a57b644fd4fd1303362
      
https://github.com/Perl/perl5/commit/9cd8b9dec65eaab758dd5a57b644fd4fd1303362
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS:t/001-basic.t : add support for TODO tests

In the standard framework for this test file, allow an optional
extra field in the  [ ...] array for each test which, if defined,
marks the test as TODO and becomes the TODO message.

This will be used in the next commit.


  Commit: 9900748ca2f0084967a8c46a6852f5e39f9a7ef3
      
https://github.com/Perl/perl5/commit/9900748ca2f0084967a8c46a6852f5e39f9a7ef3
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: consolidate INPUT tests

Move the various tests for INPUT: section syntax into a common place.
Also modernise many of those tests: many were added before the
test_many() framework was added to simplify XS syntax tests.


  Commit: 7c1f73a9fe49552b8a575de9e1a57882eab80834
      
https://github.com/Perl/perl5/commit/7c1f73a9fe49552b8a575de9e1a57882eab80834
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add 'missing initialiser value' error

INPUT lines can have an optional initialiser, e.g.

    foo(i)
        int i = SvIV(ST($arg));

However if the initialiser was missing, such as:

    foo(i)
        int i = ;

then the XS parser silently succeeded, generating invalid C code.

Add a check and tests for this.

One existing test had to be modified slightly as it was now triggering
this new check; it now passes the new check, but continues to fail on
the later 'invalid parameter declaration' check, which is what it was
supposed to be testing.


  Commit: 0a518310113058415b8348e6d6845a2363b706bf
      
https://github.com/Perl/perl5/commit/0a518310113058415b8348e6d6845a2363b706bf
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add tests for 'misplaced FOO:' error

Check that any file-scoped keywords appearing in XSUB scope raise an
error.


  Commit: 78da06b6af97f7a19fb8f50f4f54158cbf7a1801
      
https://github.com/Perl/perl5/commit/78da06b6af97f7a19fb8f50f4f54158cbf7a1801
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: warn on junk following a CODEish keyword

Keywords like CODE and INIT silently ignore anything on the keyword
line. For example this:

    CODE: aaa
        bbb
        ccc

will add the two lines bbb and ccc to the output C file, and quietly
ignore the aaa text. This commit instead makes it warn (but still
discard).

The new tests both test for the new warning and confirm that the junk is
being ignored.


  Commit: 65f56f2b2aa83047efe6e6e87a11c9a7fbcf7e6a
      
https://github.com/Perl/perl5/commit/65f56f2b2aa83047efe6e6e87a11c9a7fbcf7e6a
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: OVERLOAD: simplify regex

Clean up the regex which processes OVERLOAD keyword lines. Use //x;
and since most punctuation characters within a [] character class lose
their special regex meaning, remove lots of unnecessary '\'s

Should be no change in functionality.


  Commit: c3bab674e7f88efd2e6ab7e06eb4f22e16a3aee8
      
https://github.com/Perl/perl5/commit/c3bab674e7f88efd2e6ab7e06eb4f22e16a3aee8
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: warn on duplicate OVERLOAD entries

Previously this was silent; now it warns:

    OVERLOAD: cmp cmp


  Commit: 24c7c8c4097361f0a6311a76a62cd1e062cf1725
      
https://github.com/Perl/perl5/commit/24c7c8c4097361f0a6311a76a62cd1e062cf1725
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: refactor: split OVERLOAD args

use split, rather that while (s///), to process the arguments to an
OVERLOAD keyword line. This makes the code a little more comprehensible,
without changing functionality.


  Commit: 303d941566a832d1d624a4a6b09b15f0eccf5580
      
https://github.com/Perl/perl5/commit/303d941566a832d1d624a4a6b09b15f0eccf5580
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: ban ALIAS: 0

Code like this is an error:

    int
    foo()
      ALIAS: 1

but this was being silently allowed:

      ALIAS: 0

due to code along the lines of 'die ... if $line', which was supposed to
be checking for residual unrecognised content.


  Commit: a1ee8e7b101cebf15f2c33e4e9b639cc4a6608ec
      
https://github.com/Perl/perl5/commit/a1ee8e7b101cebf15f2c33e4e9b639cc4a6608ec
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: detect OUTPUT: SETMAGIC: bad arg values

Previously a bad OUTPUT line like this:

    OUTPUT:
        SETMAGIC: 1

emitted a generic and confusing warning message:

    Error: OUTPUT SETMAGIC: not a parameter

because a SETMAGIC line which wasn't syntactically correct was parsed
as a general OUTPUT: line.

This commit instead treats it as a SETMAGIC line, but with an invalid
argument, and adds a suitable new error message:

    Error: SETMAGIC: invalid value '1' (should be ENABLE/DISABLE)


  Commit: 7294b40d7d27eeaaec75784562b253531383da56
      
https://github.com/Perl/perl5/commit/7294b40d7d27eeaaec75784562b253531383da56
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: fix comment typos


  Commit: 3cfb254339e67131fad9729920ae13784d545cd9
      
https://github.com/Perl/perl5/commit/3cfb254339e67131fad9729920ae13784d545cd9
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add more function pointer type tests

Add more tests for where the specified type is a function pointer type,
such as 'int (*)(char *, long)'. This needs special processing by the XS
parser to stick the variable name into the '(*)'

There was an existing test for where an arg type was specified in an
INPUT line. Modernise this test to use the new test_many() XS-testing
framework, and add tests for where the type is specified in the XSUB's
signature, and where the return type is a function pointer.


  Commit: 8accaf1312846efa1f29d2e186685431a20c3856
      
https://github.com/Perl/perl5/commit/8accaf1312846efa1f29d2e186685431a20c3856
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add FALLBACK tests and fix error call

Add some basic tests for this keyword, including a test for the
'invalid value' error.

Also, fix that error handling: it was calling $self->death() rather
than $pxs->death() and so was croaking with 'no such method'. Also, improve
the text of the error message.


  Commit: 46020a448b8fbce20c1c9b3e61fccb1f5963c316
      
https://github.com/Perl/perl5/commit/46020a448b8fbce20c1c9b3e61fccb1f5963c316
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add tests for REQUIRE and improve err msg

Add some tests for this keyword (especially testing all the possible
errors that can be raised).

Also, improve the text of one of the error messages to indicate what a
valid REQUIRE value can be.


  Commit: eb5d2a6fc73aa76bad107fa29b7d977feee1fc5d
      
https://github.com/Perl/perl5/commit/eb5d2a6fc73aa76bad107fa29b7d977feee1fc5d
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: reword bad EN/DISABLE err msg

For file-scoped keywords which have only ENABLE or DISABLE as valid
values, change the error message for a bad value from/to:

    Error: $keyword: ENABLE/DISABLE
    Error: $keyword: invalid value '$s' (should be ENABLE/DISABLE)

to better indicate what the problem is.

Also fix the code comments at the top of a couple of test file code
blocks - some earlier cut+paste laziness by me left some blocks
incorrectly described.


  Commit: 024404cd798498f373eebba0043d6d9e65891499
      
https://github.com/Perl/perl5/commit/024404cd798498f373eebba0043d6d9e65891499
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: tidy up INCLUDE error messages

Unlike the rest of ParseXS, the error messages generated by INCLUDE and
INCLUDE_COMMAND didn't have an 'Error:' prefix. Add this, and do other
minor fixups.

Note that most of these errors aren't tested for. That will be fixed
shortly.


  Commit: c7b98c33f5280d67d406740de06f2c1e928fc961
      
https://github.com/Perl/perl5/commit/c7b98c33f5280d67d406740de06f2c1e928fc961
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/XSloop.xsh

  Log Message:
  -----------
  ParseXS: add basic tests for INCLUDE(_COMMAND)

There is currently a single test each for these two keywords in
002-more.t, which try to actually compile and run the generated C code.

This commit:

- adds two similar tests to 001-basic.t, which use the same test include
files, but which only generate the C file and test the contents, not
compile and run it.

- Adds a test for nearly every INCLUDE/INCLUDE_COMMAND error message,
none of which were tested before. Only two errors remain untested.

1) "Note: the INCLUDE directive with a command is discouraged"

which warns about non-portable usage, and which thus is difficult to
test portably.

2) "Error: INCLUDE_COMMAND: cannot run command"

which is for when the command fails. Perl does complicated things,
including a possible warning on STDERR in the forked child if it fails
to exec, plus dying in the parent with the same error. So I don't see an
easy way to portably test this.

This commit adds a new file, t/XSloop.xsh, which has an INCLUDE line
which refers to itself.


  Commit: e78117ec500eb7af4e52d04335ff5e407f9a1fd6
      
https://github.com/Perl/perl5/commit/e78117ec500eb7af4e52d04335ff5e407f9a1fd6
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: no stderr noise on empty INCLUDE

Recent refactoring of mine introduced a minor bug whereby INCLUDEed
content would trigger a warning if it only contained whitespace or empty
lines:

    Use of uninitialized value in scalar chomp at ...

The fix is trivial. I ought to have added a test, but that either
involves adding a new empty test file, or messing with
File::Spec->devnull(), or something; and life's too short.


  Commit: e461e045510b7e3597da2512451848c4dfb190a5
      
https://github.com/Perl/perl5/commit/e461e045510b7e3597da2512451848c4dfb190a5
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: regularise INCLUDE pipe error handling

If INCLUDE or INCLUDE_COMMAND runs a pipe, there is code in the handler
to check for the return status of the sub-process being non-zero (e.g.
non-zero exit, died with signal etc).

That handling was a bit odd. Instead of using $pxs->death(...), it was
manually doing 'print STDERR ...; exit(1)'. Also, the error message was
displaying $!, which is unconnected with the return code of the child.

This commit:

- makes it use the death() method. As a side-effect, this makes it
  display the correct line where the bad INCLUDE is located;
  previously it displayed the end of the current paragraph + 1.

- Includes the value of $? rather than $! in the error message. It just
  displays it as a 4-digit hex number rather than trying to decode the
  its various parts.

- Uses the standard error message prefix form "Error: KEYWORD: ...".

- Adds a test.


  Commit: 21134f7a5fc1405ca49c1b92d0355cb9c47b693e
      
https://github.com/Perl/perl5/commit/21134f7a5fc1405ca49c1b92d0355cb9c47b693e
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add tests for BOOT and TYPEMAP keywords

There were already a couple of TYPEMAP tests; this commit moves them to
be with other file-scoped keywords and adds more tests. There were
no basic tests of the BOOT keyword.

With this commit, all file-scoped keywords now have at least basic
tests.


  Commit: 943dc561d473f862678567817c8a9bae9cfeacd9
      
https://github.com/Perl/perl5/commit/943dc561d473f862678567817c8a9bae9cfeacd9
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add basic tests for PREINIT keyword


  Commit: 60118c0ef67ce8c78ace5e796391d59935f63b7b
      
https://github.com/Perl/perl5/commit/60118c0ef67ce8c78ace5e796391d59935f63b7b
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add some basic tests for INTERFACE_MACRO


  Commit: 8325d11bfd9d42ef15c3fea15c3914ef28130168
      
https://github.com/Perl/perl5/commit/8325d11bfd9d42ef15c3fea15c3914ef28130168
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: test INTERFACE name mangling

perxs documents how the perl and C function names are derived from the
interface name depending on prefix and class names. Add tests to confirm
that the documentation is correct.


  Commit: b26c38d0e1189b11b34e33130ddd73d1f4be675f
      
https://github.com/Perl/perl5/commit/b26c38d0e1189b11b34e33130ddd73d1f4be675f
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/114-blurt_death_Warn.t

  Log Message:
  -----------
  ParseXS: don't skip death() test

t/114-blurt_death_Warn.t used to skip testing the death() method
as it used to exit. These days the config_die_on_error flag can
be set to tell it to die instead, which can be trapped with eval.

So enable this test now.


  Commit: da7bcbf3e262750623f2edd45da9947cb04034bc
      
https://github.com/Perl/perl5/commit/da7bcbf3e262750623f2edd45da9947cb04034bc
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: warn on duplicate FALLBACK

The FALLBACK: value should only be specified at most once per package.
So add a new warning.


  Commit: 3e3228bca1eaa6fcd3bc13e2effdb87855b7539d
      
https://github.com/Perl/perl5/commit/3e3228bca1eaa6fcd3bc13e2effdb87855b7539d
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/perlxs.pod
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: doc test for TYPEMAP after XSUB

Add a test for a recently fixed bug.

>From the code comments for that new test:

    Prior to v5.43.5-157-gae3ec82909, xsubpp 3.61, a TYPEMAP appearing
    *directly* after an XSUB affected that preceding XSUB.

    This was due to TYPEMAPs being processed on the fly by fetch_para():
    while looking for the end of the XSUB, it would process the
    following typemap, *then* return the XSUB lines to be processed by
    the main loop. Thankfully TYPEMAP is now handled as a normal
    keyword.

And document that the quirk is now only in older versions.


  Commit: b9c3f7347e6258e80aeacf124b5e706cae9df118
      
https://github.com/Perl/perl5/commit/b9c3f7347e6258e80aeacf124b5e706cae9df118
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: be stricter on REQUIRE arg

The argument to the REQUIRE: keyword is supposed to be a number:
NNN or MMM.NNN. The validating regex didn't do a closing $, so any junk
following the value was allowed through, e.g. 3.0.0 or 3.0XYZ. This
commit makes such variants an error.

This seems unlikely to cause any backcompat issues.

Also, the invalid version number immediately has a numeric comparison
applied to it, which since 5.42.0 has been generating a Perl warning
like:

    Argument "3.0.0" isn't numeric in numeric ge (>=) at ...

Also a quick grep of CPAN shows no obvious distros which would break
(the REQUIRE keyword isn't common).


  Commit: 85e24a0a4e40633d8156c7c9d780878b25f8e573
      
https://github.com/Perl/perl5/commit/85e24a0a4e40633d8156c7c9d780878b25f8e573
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: refactor: don't set $_ in Param::parse()

This method had residual code from the old way of doing things, along the
lines of:

    $_ = $param_text;
    ...
    if (/.../) {...}

Instead just use the $param_text var explicitly when matching etc, as
relying on $_ being valid across a 150 line sub isn't best practice.


  Commit: 352c2d88458610ad8785ba5b1dac5c8031e93106
      
https://github.com/Perl/perl5/commit/352c2d88458610ad8785ba5b1dac5c8031e93106
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: ban length(s) without a type

This is legal:

    void
    foo(char *s, int length(s))

but so was this; make it illegal:

    void
    foo(char *s, length(s))

Previously if the type of length() wasn't specified, it would (depending
on the xsubpp version) either generate broken C code and/or emit
lots of 'Use of uninitialized value' type noise.


  Commit: e2d74910ec38204b6a5edfa97a8a90a3ac59ba22
      
https://github.com/Perl/perl5/commit/e2d74910ec38204b6a5edfa97a8a90a3ac59ba22
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: tweak param-parsing code

In a couple of places there are checks on whether certain constructs
such as IN_OUT are disallowed due to a switch like -noinout.

Because these use blurt() to report the error, parsing will continue.
So this commit makes the parsing code still process the IN_OUT modifier
(or whatever) as normal, to reduce the risk of a cascade of weird
errors.


  Commit: ecdeb6b1a87541e6d127f6a23dd916c65ebbce9c
      
https://github.com/Perl/perl5/commit/ecdeb6b1a87541e6d127f6a23dd916c65ebbce9c
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: reindent block following previous commit

whitespace-only change


  Commit: e9ae360f40a3c9646e431d90c93d1e8948aaa932
      
https://github.com/Perl/perl5/commit/e9ae360f40a3c9646e431d90c93d1e8948aaa932
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: ban IN_OUT etc modifiers with length(s)

Disallow signatures like

    int
    foo(char *s, IN_OUT int length(s))

Most of the I/O modifiers make no sense with length(), and either
produced bad C code, or in recent Perls, generated an internal error.
There seems little benefit in getting a couple of cases to work for some
sort of obscure semantics. So this commit goes for a blanket ban.


  Commit: 57e28107d3bbc0c80c25bb77c834a4906b876ecd
      
https://github.com/Perl/perl5/commit/57e28107d3bbc0c80c25bb77c834a4906b876ecd
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: length() tests: add type

Several tests which were expected to raise an error didn't include a type
for the length() pseudo-parameter. This was harmless, as the error that
was being tested for occurred before any check for a missing type.

But best for a test case to only include the one syntax error which is
actually being checked for.


  Commit: f59707e65752021905adcca3103bb31407b54a01
      
https://github.com/Perl/perl5/commit/f59707e65752021905adcca3103bb31407b54a01
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: test for length(s) = NO_INIT

This is already banned under the 'no default value for length' rule, but
add a test for the specific NO_INIT variant. This is in case
special-case parsing code for NO_INIT ever inadvertently bypasses the
length() error-detecting code.


  Commit: acb2f071552c4b37d05deca142d187d552b8ae0b
      
https://github.com/Perl/perl5/commit/acb2f071552c4b37d05deca142d187d552b8ae0b
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: ban length() on placeholder param

Make this an error:

    int
    foo(placeholder, int length(placeholder))

A parameter without a type is a placeholder: it's not a real variable,
so its length can't be retrieved. Prior to this commit, autocall would
pass an uninitialised variable to the C library function.

Also add a code comment explaining where checks like these are done


  Commit: e341bfb00397867fe20113e577e1d8c14e4de24c
      
https://github.com/Perl/perl5/commit/e341bfb00397867fe20113e577e1d8c14e4de24c
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: move length() default var check earlier

There is a check which disallows the parameter associated with length()
to have a default value; e.g.:

    foo(char *s = "", int length(s))

However the check for this was done later than all the other length
param consistency checks; in fact it was being done during typemap
lookup for that parameter, and was only done if the param mapped to type
T_PV.

This commit moves the check earlier, to be with all the other
basic parsing consistency checks, and makes it so that even non T_PV
types trigger the error.

A new test has been added for the non-T_PV case, and an existing test
has been fixed that was unnecessarily (it was not part of the test)
using length() on a non-T_PV param.


  Commit: 25f067ccd1327f284b6d6cf3ecfb309b3dfa3430
      
https://github.com/Perl/perl5/commit/25f067ccd1327f284b6d6cf3ecfb309b3dfa3430
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: ban OUT* params with length()

A few commits ago, 'foo(char *s, IN_OUT length(s))' etc was banned.

This commit adds a similar but less harsh restriction on the parameter
itself; e.g. this is banned now:

    foo(OUT char *s, int length(s))

Any modifier on s which doesn't have an IN component is now banned, as
without IN, the generated C code will skip doing:

    s = SvPV(ST(0), STRLEN_length_of_s);

and so the length-setting doesn't get done.


  Commit: 4d245334b8563839b56f6b14ff08cb6c16c023e8
      
https://github.com/Perl/perl5/commit/4d245334b8563839b56f6b14ff08cb6c16c023e8
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: refactor: simplify {is_ansi} field

Now that length(s) pseudo-parameters raise an error if they don't have a
type, the is_ansi flag can simply indicate that a parameter had its
type included in the signature, and thus doesn't need an INPUT entry.

This allows some code to be simplified: no more

    if ($self->{is_ansi} || $self->{is_length})

style code.


  Commit: cb24d40c4a06cf6ef3d9ae6de273b54499ac5ced
      
https://github.com/Perl/perl5/commit/cb24d40c4a06cf6ef3d9ae6de273b54499ac5ced
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: rename has_length field to length_param

In something like

    int
    foo(char *s, int length(s))

the node object for the first parameter has a $self->{has_length}
boolean flag set, to indicate that it is associated with a length()
pseudo-parameter (and the pseudo-parameter has its $self->{is_length}
field set).

This commit renames the has_length field to length_param, and changes it
from being a boolean to being a ref to the pseudo-parameter's node object.

The effect is the same (it can still be used as a boolean), but the ref
will be useful in the next commit.


  Commit: e3137477783c968f1a87578cf1b5e80467d1824d
      
https://github.com/Perl/perl5/commit/e3137477783c968f1a87578cf1b5e80467d1824d
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: reorganise length param code generation

In something like

    int
    foo(char *s, int length(s))

the presence of the length pseudo-parameter causes the
declaration/initialisation code for the 's' parameter to change from a
simple:

    char *s = (char *)SvPV_nolen(ST(0));

to the more complex:

    STRLEN  STRLEN_length_of_s;
    int     XSauto_length_of_s;
    char *  s = (char *)SvPV(ST(0), STRLEN_length_of_s);

    XSauto_length_of_s = STRLEN_length_of_s;

The responsibility for generating that extra code is spread around
multiple places; this commit attempts to more centralise it.

This commit has a side effect: previously the declarations of the
STRLEN/XSauto variables for *all* length-ish parameters came first,
before the declarations of any ANSI parameters; now they come just
before the declaration of each associated variable (such as the
'char *s = ...' above). This is unlikely to have any practical downside.

The actual change is that previously, when as_input_code() was called
twice, once for 's' and once for 'length(s)', the first call emitted the
'char *s' line, while the second call emitted the other three lines.
After this commit, the first call generates all four lines, and the
second, nothing.


  Commit: c9c059cab5da85e429c5d8222941518d39a6d0fe
      
https://github.com/Perl/perl5/commit/c9c059cab5da85e429c5d8222941518d39a6d0fe
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

  Log Message:
  -----------
  ParseXS: simplify XSauto length() param handling

Change the $param->{var} value of a length pseudo-parameter from
'length(s)' to 'XSauto_length_of_s'.

This one simple trick allows a bunch of special-casing code in various
places to be removed. After this commit, the string 'XSauto_length_of_'
only appears once in Node.pm, apart from code comments.

No changes to the generated C code.


  Commit: a04ffd6445c4ca3a3b05391b060aadc100ccb577
      
https://github.com/Perl/perl5/commit/a04ffd6445c4ca3a3b05391b060aadc100ccb577
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add test for alien length type

This is legal:

    int
    foo(char *s, blah length(s))

where the 'blah' type doesn't have to be found in a typemap.
Add a test for this.


  Commit: bfc752dc6eef65f8876d88c5413fbec04987bf6d
      
https://github.com/Perl/perl5/commit/bfc752dc6eef65f8876d88c5413fbec04987bf6d
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: better handle non-T_PV length(s) params

In something like

    int
    foo(char *s, int length(s))

the XS parser has been sort of assuming that the type of s, e.g.
'char *', always maps to T_PV.

If this is the case, then the typemap entry which would normally be
used, i.e.

    $var = ($type)SvPV_nolen($arg)

is discarded, and a hard-coded entry is used instead:

    ($type)SvPV($arg, STRLEN_length_of_$var);

(with the fields being populated directly rather than via the standard
typemap template expansion route).

This goes horribly wrong if the type of s doesn't map to T_PV. Before
this commit, the parser just silently used the standard template. This
meant that STRLEN_length_of_s didn't get initialised, and SEGVs ensued.

It also didn't work well if the XS code tried to override the standard
T_PV INPUT template.

Following this commit, the parser doesn't care what T_FOO the string
variable's type maps to; instead it just tries to modify the current
typemap template to be suitable for setting the string length too. The
new rules are:

* If the template already contains 'STRLEN_length_of_$var', use it
  unmodified; the assumption is that some XS author has been playing fast
  and loose with the implementation and knows what they are doing.

* If the template looks like

  ...  SvPV..._nolen...($arg) ...

  then modify it to the following (i.e. strip out the _nolen and add an
  arg):

  ...  SvPV......($arg, STRLEN_length_of_$var) ...

  and allow the normal template processing and expansion to proceed.

  I.e. modify anything which looks like an SvPV_nolen() variant,
  including SvPVutf8_nolen(), SvPV_nolen_const() etc.

* Otherwise die, with a long hint message explaining why the template
  couldn't be modified.

The original issue, with a rejected fix and a discussion which
ultimately led to this commit, can be found in PR #23479.


  Commit: 097e4e0c2584d7115e6cb0c61bde83cf5d5ddc9d
      
https://github.com/Perl/perl5/commit/097e4e0c2584d7115e6cb0c61bde83cf5d5ddc9d
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: refactor: 001-basic.t: add flags

Currently most individual tests in this file are specified within its
test_many() framework  by using an array ref such as

    [ 0, 0, qr{...}, "description", "optional TODO text" ]

where the first two values are 0 or 1, and indicate that the test
should be inverted and/or that the regex should be matched against
STDRRR rather than STDOUT.

This commit converts those two boolean fields into a single flags
integer, with NOT and ERR bit constants available. For example,

    [ 0, 0, qr{...}, "description 1"]
    [ 0, 1, qr{...}, "description 2"]
    [ 1, 1, qr{...}, "description 3"]

becomes

    [  0     , qr{...}, "description 1"]
    [NOT     , qr{...}, "description 2"]
    [ERR|NOT , qr{...}, "description 3"]

This commit is huge because it is changing 1000 tests; but the change is
simple.

The next commit will add a TODO flag.


  Commit: d5fa2b696a82c3f8bc741d6283914bcb915e1ed4
      
https://github.com/Perl/perl5/commit/d5fa2b696a82c3f8bc741d6283914bcb915e1ed4
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: refactor: 001-basic.t: add TODO flag

Following on from the previous commit which added a flags field to each
test in its test_many() framework, add a TODO flag. A test is now
indicated to be TODO by the presence of this flag rather than by an
optional extra text field in the test array ref. This extra field can
still be present, and still acts as the text to use for 'local $TODO =
"..."', but now its an error for that field to be present without the
TODO flag also.


  Commit: 30b259469d64b852f2af506c45b4759c9cd6bb32
      
https://github.com/Perl/perl5/commit/30b259469d64b852f2af506c45b4759c9cd6bb32
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: add 'use warnings'

This test script already had 'use strict' at the top, but not warnings
for some reason.

This commit adds 'use warnings'. Nothing broke.


  Commit: bcb1f38f687c2e8fa8aa56277d72a09509d331fa
      
https://github.com/Perl/perl5/commit/bcb1f38f687c2e8fa8aa56277d72a09509d331fa
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: simplify test API

The test_many() framework local to 001-basic.t was originally designed
for the lines each test XS code fragment to be passed as an array ref,
e.g.

            [
                ...,
                [
                    'int',
                    'foo(int aaa)',
                ],
                ...,
            ],

I soon started using the heredoc / Q mechanism to instead pass the text
as a single multi-line string within the arrayref, e.g.

            [
                ...,
                [ Q(<<'EOF') ],
                    |int
                    |foo(int aaa)
    EOF
                ...,
            ],

and the bulk of the tests in this test file now use that second format.

This commit make it stop expecting that argument to be an arrayref and
makes it just be a single multiline string instead. This commit converts
all the tests of either of the two formats above into the simpler:

            [
                ...,
                Q(<<'EOF'),
                    |int
                    |foo(int aaa)
    EOF
                ...,
            ],

This is a big commit, but its basically doing the same trivial change a
thousand times.


  Commit: 60c4f928d222537d0f77ef9b09abaa2626d53deb
      
https://github.com/Perl/perl5/commit/60c4f928d222537d0f77ef9b09abaa2626d53deb
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: modernise default test

Remove a test using the old-style hand-rolled test mechanism
and add a similar test using the newer test framework.


  Commit: e807d4992cd7a83e99486d59a0baa40dbaa39de1
      
https://github.com/Perl/perl5/commit/e807d4992cd7a83e99486d59a0baa40dbaa39de1
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: add basic type tests

Early in the file, add a set of basic type lookup tests. Similar lookups
are done all over this test file, but there wasn't a coordinated set
of tests to check all the basic permutations.

Also, remove one old-style hand-rolled test and incorporate its intent in
one of the new tests.


  Commit: b8b9524e79f7e6dc1d77672cecd9c1b711ab044f
      
https://github.com/Perl/perl5/commit/b8b9524e79f7e6dc1d77672cecd9c1b711ab044f
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: add tests for OUT with INPUT

There are already a set of tests for the various OUT modifiers
where the parameter types are specified in the signature. Add a duplicate
set of tests where the types are specified on INPUT lines instead.

Also remove an old-style hand-rolled test which tested this but just for
the single 'OUT' modifier.


  Commit: 3336c8960ba9b129469e20b568871a34ee58dfaf
      
https://github.com/Perl/perl5/commit/3336c8960ba9b129469e20b568871a34ee58dfaf
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: modernise usage test

Remove a test using the old-style hand-rolled test mechanism
and add a similar test using the newer test framework.


  Commit: a00171a93f354ee172ae5ec973bb541ea01f59e7
      
https://github.com/Perl/perl5/commit/a00171a93f354ee172ae5ec973bb541ea01f59e7
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: add more ellipsis tests

Add more tests for foo(int i, ...) style signatures, especially when
mixed with default values.

Modernise the couple of existing ellipsis tests which still used the
old-style hand-rolled test mechanism.


  Commit: d3cc4ddc35ccc34eee2944a10f4dbe0c85d5281a
      
https://github.com/Perl/perl5/commit/d3cc4ddc35ccc34eee2944a10f4dbe0c85d5281a
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: t/001-basic.t: modernise C++ test

There are already a good set of modern tests for C++/class support.
Remove the one C++ test still using the old-style hand-rolled test
mechanism and add a similar test to the new-style tests.


  Commit: 7b39f9e0ea7317e8d5fa54b62542efb6c310fd85
      
https://github.com/Perl/perl5/commit/7b39f9e0ea7317e8d5fa54b62542efb6c310fd85
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    M dist/ExtUtils-ParseXS/t/114-blurt_death_Warn.t
    R dist/ExtUtils-ParseXS/t/XSNoMap.xs

  Log Message:
  -----------
  ParseXS: delete t/XSNoMap.xs

This is a short test file whose sole purpose is to contain a syntax
error which will trigger a call to $self->death(). A test in
t/001-basic.t then checks that the error is caught by eval and doesn't
appear on STDERR.

However, there is already a test framework in t/114-blurt_death_Warn.t
to test the death() etc API calls. So extend one of those tests to
confirm that STDERR is empty, and remove XSNoMap.xs and its associated
test in 001-basic.t.


  Commit: 24f783992d74633ce4ded03e31822aa0c8c228e6
      
https://github.com/Perl/perl5/commit/24f783992d74633ce4ded03e31822aa0c8c228e6
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: 001-basic.t: improve test_many()

Improve the main test framework function used in the file.

Add an optional extra parameter which contains options to pass to the
process_file() method, and rerwrite the function's description


  Commit: 9ad2b49911e9865c10abacd74bebfd82bc4bcccc
      
https://github.com/Perl/perl5/commit/9ad2b49911e9865c10abacd74bebfd82bc4bcccc
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: t/001-basic.t: modernise -nofoo tests

Modernise the tests which check for errors under the -noargtypes,
-noinout flags.


  Commit: adce1f5935f3de9c4e67f7b1eb73687b03c9fa86
      
https://github.com/Perl/perl5/commit/adce1f5935f3de9c4e67f7b1eb73687b03c9fa86
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: t/001-basic.t: modernise input ref test

Modernise the very basic test which checks that using a string
reference as the XS input file gives sane results.


  Commit: 71d90fa873b64e60f17506f92b07468c11d00fba
      
https://github.com/Perl/perl5/commit/71d90fa873b64e60f17506f92b07468c11d00fba
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    R dist/ExtUtils-ParseXS/t/XSAlias.xs

  Log Message:
  -----------
  ParseXS: delete t/XSAlias.xs

In t/001-basic.t there are a bunch of old-style tests for the ALIAS
keyword which read from t/XSAlias.xs. There are also a bunch of
new-style tests which don't need an external test file.

This commit deletes the old-style tests and XSAlias.xs, and augments the
new-style tests with anything that was only covered in the old tests.


  Commit: 58c8b8f72bab23a6c217e0f34166cbb646d67e3d
      
https://github.com/Perl/perl5/commit/58c8b8f72bab23a6c217e0f34166cbb646d67e3d
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    R dist/ExtUtils-ParseXS/t/XSTightDirectives.xs

  Log Message:
  -----------
  ParseXS: delete t/XSTightDirectives.xs

In t/001-basic.t there is an old-style test for an XSUB being
'tightly cuddled' by #if/#else/#endif, i.e. where there isn't a blank
line after each CPP directive. This test reads from t/XSTightDirectives.xs.
There are also some new-style tests for CPP directives.

This commit deletes the old-style test and XSTightDirectives.xs, and
augments the new-style tests with a cuddle test.


  Commit: 483c1b1686eda86e6aedfe36afe065d6fffc6b33
      
https://github.com/Perl/perl5/commit/483c1b1686eda86e6aedfe36afe065d6fffc6b33
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    R dist/ExtUtils-ParseXS/t/XSFalsePositive.xs
    R dist/ExtUtils-ParseXS/t/XSFalsePositive2.xs

  Log Message:
  -----------
  ParseXS: delete t/XSFalsePositive*.xs

In t/001-basic.t there are a couple of old-style tests which check that
the 'duplicate XSUB' warning isn't emitted when one of the two XSUBs
with the same name is protected by an '#if/#endif' guard.
There are better tests for this elsewhere in 001-basic.t now, so
this commit deletes the old tests and their associated test files:

    t/XSFalsePositive.xs
    t/XSFalsePositive2.xs


  Commit: 1ca278fa8d5e8dde396be8832d9540240402337e
      
https://github.com/Perl/perl5/commit/1ca278fa8d5e8dde396be8832d9540240402337e
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    R dist/ExtUtils-ParseXS/t/XSBroken.xs

  Log Message:
  -----------
  ParseXS: delete t/XSBroken.xs

In t/001-basic.t there is an old-style test for the 'no INPUT
definition' error message, which reads from t/XSBroken.xs. There is also
a similar new-style test which doesn't need an external test file.

This commit deletes the old-style test and XSBroken.xs.
It also improves the new-style slightly - it checks for more of the
error message than before.


  Commit: a14afa9061d00f750b6311a0e5fa46bae4647771
      
https://github.com/Perl/perl5/commit/a14afa9061d00f750b6311a0e5fa46bae4647771
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    R dist/ExtUtils-ParseXS/t/115-avoid-noise.t
    R dist/ExtUtils-ParseXS/t/XSWarn.xs

  Log Message:
  -----------
  ParseXS: delete t/115-avoid-noise.t, t/XSWarn.xs

This test file and associated data file was added to check that there
are no "uninit var" warnings when an 'alien' variable is declared - i.e.
one which appears in an INPUT line but not in the XSUB's signature.

There are better tests for this now in 001-basic.t, so this commit
deletes those two files. It also adds the exact test from them to the
new-style 'alien' test section, even though its not strictly necessary.


  Commit: fdaf8f27884486c585d8067506141411b0cfae50
      
https://github.com/Perl/perl5/commit/fdaf8f27884486c585d8067506141411b0cfae50
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    M dist/ExtUtils-ParseXS/t/002-more.t
    M dist/ExtUtils-ParseXS/t/003-usage.t
    A dist/ExtUtils-ParseXS/t/301-run-basic.t

  Log Message:
  -----------
  ParseXS: add 301-run-basic.t

In summary: move the execution tests from 001-basic.t into their
own file, in a new number range 3xx.

In detail: originally, 001-basic.t parsed XSTest.xs into XSTest.c,
then ran a C compiler on it and tried to load the object file and
call some of the XSUBs within it.

Over time, 001-basic.t accumulated lots of tests which only run the XS
Parser and use regexes to check for the correct snippets of C code (i.e.
no C compiler is used).

My goal is that 0xx-foo.t files will eventually only run the XS parser
and test with regexes; while the heavy-duty tests which actually use a C
compiler will come under 3xx-run-foo.t.

So this commit moves the code which messes with XSTest.xs and XSTest.c
into 301-run-basic.t.

The next two commits will rename 002-more.t and 003-usage.t (which compile
XSMore.xs and XSUsage.xs) to 30x-run-foo.t


  Commit: 8b82dc899774ece1bc5d200889473d2d75750b7d
      
https://github.com/Perl/perl5/commit/8b82dc899774ece1bc5d200889473d2d75750b7d
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    R dist/ExtUtils-ParseXS/t/002-more.t
    A dist/ExtUtils-ParseXS/t/302-run-more.t

  Log Message:
  -----------
  ParseXS: rename t/002-more.t to t/302-run-more.t

See the previous commit for the rationale.


  Commit: 795a9d3c1d8d919b2335e69a3034bf3c3fdc7227
      
https://github.com/Perl/perl5/commit/795a9d3c1d8d919b2335e69a3034bf3c3fdc7227
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    R dist/ExtUtils-ParseXS/t/003-usage.t
    A dist/ExtUtils-ParseXS/t/303-run-usage.t

  Log Message:
  -----------
  ParseXS: rename t/003-usage.t to t/303-run-usage.t

See the previous commit but one for the rationale.


  Commit: 95117fbde5a1d3e3819a2fb5d78ffd02dfaf2d60
      
https://github.com/Perl/perl5/commit/95117fbde5a1d3e3819a2fb5d78ffd02dfaf2d60
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/301-run-basic.t
    M dist/ExtUtils-ParseXS/t/302-run-more.t
    M dist/ExtUtils-ParseXS/t/303-run-usage.t

  Log Message:
  -----------
  ParseXS: add top comments to new 3xx-run-foo files

Add some comments at the top of these three new test files to explain
their purpose.


  Commit: 1fdffb3b3698b8ac4734e62e756bf94888556b3f
      
https://github.com/Perl/perl5/commit/1fdffb3b3698b8ac4734e62e756bf94888556b3f
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    A dist/ExtUtils-ParseXS/t/000-version.t
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS: add t/000-version.t

This commit moves a test out of 001-basic.t into its own test file which
checks that ExtUtils::ParseXS can be loaded and that its version matches
that in lib/perxs.pod.

As of this commit, 001-basic.t now contains only parse tests of XS
snippets using the test_many() framework. Previous commits have removed
anything else out of it.

The next series of commits will split  001-basic.t into several
smaller files, as its currently about 7000 lines long.


  Commit: 525baa55ac282224aee18f0ecefe2424a4986c39
      
https://github.com/Perl/perl5/commit/525baa55ac282224aee18f0ecefe2424a4986c39
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/lib/TestMany.pm

  Log Message:
  -----------
  ParseXS: add t/lib/TestMany.pm

Move the test_many() sub and associated stuff out of t/001-basic.t
and into its own module so that it can be shared across multiple test
files. This is a prelude to splitting t/001-basic.t.


  Commit: 850bca14f87bceea5c8bf34b06bfeed22dd73ccf
      
https://github.com/Perl/perl5/commit/850bca14f87bceea5c8bf34b06bfeed22dd73ccf
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/002-parse-file-scope.t

  Log Message:
  -----------
  ParseXS: add t/002-parse-file-scope.t

Move out of 001-basic.t and into their own test file, the tests which
are concerned with things which can appear at file-scope in an XS file
(i.e. outside an XSUB), apart from file-scoped keywords.

This is just several simple cut and pastes of blocks of tests; no
changes have been made to the tests themselves.

This commit is part of splitting 001-basic.t into several smaller files,
with a more coherent grouping.


  Commit: 11d2cbf02984007d877ecb0f27bd572295807f17
      
https://github.com/Perl/perl5/commit/11d2cbf02984007d877ecb0f27bd572295807f17
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/003-parse-file-scope-keywords.t

  Log Message:
  -----------
  ParseXS: add t/003-parse-file-scope-keywords.t

Move out of 001-basic.t and into their own test file, the tests which
are concerned with keywords which can appear at file-scope in an XS file
(i.e. outside an XSUB).

This is just several simple cut and pastes of blocks of tests; no
changes have been made to the tests themselves.

This commit is part of splitting 001-basic.t into several smaller files,
with a more coherent grouping.


  Commit: 270d94fa8e43efc7d44d47fd3a0f5a8289d7ba04
      
https://github.com/Perl/perl5/commit/270d94fa8e43efc7d44d47fd3a0f5a8289d7ba04
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/004-parse-xsub-declaration.t

  Log Message:
  -----------
  ParseXS: add t/004-parse-xsub-declaration.t

Move out of 001-basic.t and into their own test file, the tests which
are concerned with parsing the declaration of an XSUB (i.e. the first
two lines).

This is just several simple cut and pastes of blocks of tests; no
changes have been made to the tests themselves.

This commit is part of splitting 001-basic.t into several smaller files,
with a more coherent grouping.


  Commit: cec1e7ae3e717ace992850e302b897fc2d3e7b25
      
https://github.com/Perl/perl5/commit/cec1e7ae3e717ace992850e302b897fc2d3e7b25
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/005-parse-parameters.t

  Log Message:
  -----------
  ParseXS: add t/005-parse-parameters.t

Move out of 001-basic.t and into their own test file, the tests which
are concerned with parsing the individual parameters of an XSUB.

This is just several simple cut and pastes of blocks of tests; no
changes have been made to the tests themselves.

This commit is part of splitting 001-basic.t into several smaller files,
with a more coherent grouping.


  Commit: db21913e83afd44ae4ed73646ec04221f1445427
      
https://github.com/Perl/perl5/commit/db21913e83afd44ae4ed73646ec04221f1445427
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/006-parse-return-type.t

  Log Message:
  -----------
  ParseXS: add t/006-parse-return-type.t

Move out of 001-basic.t and into their own test file, the tests which
are concerned with parsing the return type of an XSUB.

This is just several simple cut and pastes of blocks of tests; no
changes have been made to the tests themselves.

This commit is part of splitting 001-basic.t into several smaller files,
with a more coherent grouping.


  Commit: 0a3358a6c0a333db74006fe493307040a9857f4c
      
https://github.com/Perl/perl5/commit/0a3358a6c0a333db74006fe493307040a9857f4c
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/007-parse-input-output.t

  Log Message:
  -----------
  ParseXS: add t/007-parse-input-output.t

Move out of 001-basic.t and into their own test file, the tests which
are concerned with parsing the INPUT and OUTPUT keywords of an XSUB.

This is just several simple cut and pastes of blocks of tests; no
changes have been made to the tests themselves.

This commit is part of splitting 001-basic.t into several smaller files,
with a more coherent grouping.


  Commit: 7f2eaf9984704eb5c4189019770e7e434bd75d35
      
https://github.com/Perl/perl5/commit/7f2eaf9984704eb5c4189019770e7e434bd75d35
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/008-parse-xsub-keywords.t

  Log Message:
  -----------
  ParseXS: add t/008-parse-xsub-keywords.t

Move out of 001-basic.t and into their own test file, the tests which
are concerned with parsing the  keywords (except INPUT and OUTPUT) of an
XSUB.

This is just several simple cut and pastes of blocks of tests; no
changes have been made to the tests themselves.

This commit is part of splitting 001-basic.t into several smaller files,
with a more coherent grouping.


  Commit: 673f81a3c099d0e80ebfe79143b689f3332cc9af
      
https://github.com/Perl/perl5/commit/673f81a3c099d0e80ebfe79143b689f3332cc9af
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/009-parse-c-plusplus.t

  Log Message:
  -----------
  ParseXS: add t/009-parse-c-plusplus.t

Move out of 001-basic.t and into their own test file, the tests which
are concerned with parsing the C++ support features for XSUBs.

This is just several simple cut and pastes of blocks of tests; no
changes have been made to the tests themselves.

This commit is part of splitting 001-basic.t into several smaller files,
with a more coherent grouping.


  Commit: 192d5227cda471bbaa2285d743d6dc5db089fd50
      
https://github.com/Perl/perl5/commit/192d5227cda471bbaa2285d743d6dc5db089fd50
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    R dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/001-parse-basic.t

  Log Message:
  -----------
  ParseXS: rename t/001-basic.t t/001-parse-basic.t

In the previous commits, most of the body of t/001-basic.t has been
moved out into separate 0xx-parse-foo.t files. Rename this file now
so that it is also a 0xx-parse- file.


  Commit: a9bc2343006e7e902169663cc635dfb564ba3498
      
https://github.com/Perl/perl5/commit/a9bc2343006e7e902169663cc635dfb564ba3498
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/001-parse-basic.t

  Log Message:
  -----------
  ParseXS: t/001-parse-basic.t: add std comments

Add the standard boilerplate to the top of the file.


  Commit: f8bd623af69958bf42b19498c4bc00bdf9dc66ce
      
https://github.com/Perl/perl5/commit/f8bd623af69958bf42b19498c4bc00bdf9dc66ce
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    R dist/ExtUtils-ParseXS/t/pseudotypemap1

  Log Message:
  -----------
  ParseXS: delete t/pseudotypemap1

This test data file has not been used since v5.15.0-477-g9b58169ac2,
but has been hanging around ever since.


  Commit: 260a9430830047568a1290bc950241c81b263a2c
      
https://github.com/Perl/perl5/commit/260a9430830047568a1290bc950241c81b263a2c
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    R dist/ExtUtils-ParseXS/t/108-map_type.t

  Log Message:
  -----------
  ParseXS: delete t/108-map_type.t

This test file has apparently never actually tested anything, and
there's already another test file, t/104-map_type.t which actually tests
the map_type() method.


  Commit: abb088655f63c9368cee5d774c284aee0250c533
      
https://github.com/Perl/perl5/commit/abb088655f63c9368cee5d774c284aee0250c533
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    R dist/ExtUtils-ParseXS/t/112-set_cond.t

  Log Message:
  -----------
  ParseXS: delete t/112-set_cond.t

This test file doesn't actually test anything.

The set_cond() method is fairly trivial; it just returns a short snippet
of C code like "items < 1" for use in an XSUB's number-of-args checking,
and there's plenty of tests in the 0xx-parse-foo.t test files for that
already.


  Commit: d269605bd4ce5b89790da8df01944577939a6412
      
https://github.com/Perl/perl5/commit/d269605bd4ce5b89790da8df01944577939a6412
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    A dist/ExtUtils-ParseXS/t/101-api-standard_typemap_locations.t
    R dist/ExtUtils-ParseXS/t/101-standard_typemap_locations.t
    A dist/ExtUtils-ParseXS/t/102-api-trim_whitespace.t
    R dist/ExtUtils-ParseXS/t/102-trim_whitespace.t
    A dist/ExtUtils-ParseXS/t/103-api-tidy_type.t
    R dist/ExtUtils-ParseXS/t/103-tidy_type.t
    A dist/ExtUtils-ParseXS/t/104-api-map_type.t
    R dist/ExtUtils-ParseXS/t/104-map_type.t
    A dist/ExtUtils-ParseXS/t/105-api-valid_proto_string.t
    R dist/ExtUtils-ParseXS/t/105-valid_proto_string.t
    A dist/ExtUtils-ParseXS/t/106-api-process_typemaps.t
    R dist/ExtUtils-ParseXS/t/106-process_typemaps.t
    A dist/ExtUtils-ParseXS/t/113-api-check_cond_preproc_statements.t
    R dist/ExtUtils-ParseXS/t/113-check_cond_preproc_statements.t
    A dist/ExtUtils-ParseXS/t/114-api-blurt_death_Warn.t
    R dist/ExtUtils-ParseXS/t/114-blurt_death_Warn.t

  Log Message:
  -----------
  ParseXS: rename t/1xx-*.t to t/1xx-api-*.t

Each of the 1xx-*.t test files run tests on a particular API function.
So rename all these files to include a -api- prefix (in the same way
that the parsing files are all 0xx-parse-foo.t and the code running are
all 3xx-run-foo.t)


  Commit: 1f83f42ab72a395f4aef45229a7832944f55822b
      
https://github.com/Perl/perl5/commit/1f83f42ab72a395f4aef45229a7832944f55822b
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/101-api-standard_typemap_locations.t
    M dist/ExtUtils-ParseXS/t/102-api-trim_whitespace.t
    M dist/ExtUtils-ParseXS/t/103-api-tidy_type.t
    M dist/ExtUtils-ParseXS/t/104-api-map_type.t
    M dist/ExtUtils-ParseXS/t/105-api-valid_proto_string.t
    M dist/ExtUtils-ParseXS/t/106-api-process_typemaps.t
    M dist/ExtUtils-ParseXS/t/113-api-check_cond_preproc_statements.t

  Log Message:
  -----------
  ParseXS: add comments at the top of all t/1xx*.t

Add a boilerplate comment line explaining the purpose of each file.


  Commit: 5accc510a45eedc826cce1785475f5a5b71b539b
      
https://github.com/Perl/perl5/commit/5accc510a45eedc826cce1785475f5a5b71b539b
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    R dist/ExtUtils-ParseXS/t/501-t-compile.t
    A dist/ExtUtils-ParseXS/t/501-typemaps-compile.t
    R dist/ExtUtils-ParseXS/t/510-t-bare.t
    A dist/ExtUtils-ParseXS/t/510-typemaps-bare.t
    R dist/ExtUtils-ParseXS/t/511-t-whitespace.t
    A dist/ExtUtils-ParseXS/t/511-typemaps-whitespace.t
    R dist/ExtUtils-ParseXS/t/512-t-file.t
    A dist/ExtUtils-ParseXS/t/512-typemaps-file.t
    R dist/ExtUtils-ParseXS/t/513-t-merge.t
    A dist/ExtUtils-ParseXS/t/513-typemaps-merge.t
    R dist/ExtUtils-ParseXS/t/514-t-embed.t
    A dist/ExtUtils-ParseXS/t/514-typemaps-embed.t
    R dist/ExtUtils-ParseXS/t/515-t-cmd.t
    A dist/ExtUtils-ParseXS/t/515-typemaps-cmd.t
    R dist/ExtUtils-ParseXS/t/516-t-clone.t
    A dist/ExtUtils-ParseXS/t/516-typemaps-clone.t
    R dist/ExtUtils-ParseXS/t/517-t-targetable.t
    A dist/ExtUtils-ParseXS/t/517-typemaps-targetable.t
    A dist/ExtUtils-ParseXS/t/518-typemaps-compat.t
    R dist/ExtUtils-ParseXS/t/600-t-compat.t

  Log Message:
  -----------
  ParseXS: rename t/5xx-t-*.t to t/5xx-typemaps-*.t

The 5xx-t-foo.t files all test ExtUtils::Typemaps (as opposed to all the
other test files in the t/ directory which test ExtUtils::ParseXS).
Rename the filename prefix from -t- to -typemaps- to better signal this
fact.

600-t-compat.t is a bit of an odd one - it's also testing
ExtUtils::Typemaps and I'm not sure why its 600 rather than 5xx. It's
the only 6xx in the directory. I've renamed it to 518-typemaps-compat.t
for consistency.


  Commit: 99b6bfe7bb9904f600e94293a58abc6070ca5c3f
      
https://github.com/Perl/perl5/commit/99b6bfe7bb9904f600e94293a58abc6070ca5c3f
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/501-typemaps-compile.t
    M dist/ExtUtils-ParseXS/t/510-typemaps-bare.t
    M dist/ExtUtils-ParseXS/t/511-typemaps-whitespace.t
    M dist/ExtUtils-ParseXS/t/512-typemaps-file.t
    M dist/ExtUtils-ParseXS/t/513-typemaps-merge.t
    M dist/ExtUtils-ParseXS/t/514-typemaps-embed.t
    M dist/ExtUtils-ParseXS/t/515-typemaps-cmd.t
    M dist/ExtUtils-ParseXS/t/516-typemaps-clone.t
    M dist/ExtUtils-ParseXS/t/517-typemaps-targetable.t
    M dist/ExtUtils-ParseXS/t/518-typemaps-compat.t

  Log Message:
  -----------
  ParseXS: add comment at the top of all t/5xx*.t

Add a boilerplate comment line or two explaining the purpose of each
file.


  Commit: d9d299e8822c54eefe60063e4e7d87fa6cc73f35
      
https://github.com/Perl/perl5/commit/d9d299e8822c54eefe60063e4e7d87fa6cc73f35
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/t/106-api-process_typemaps.t
    M dist/ExtUtils-ParseXS/t/512-typemaps-file.t
    M dist/ExtUtils-ParseXS/t/513-typemaps-merge.t
    M dist/ExtUtils-ParseXS/t/515-typemaps-cmd.t
    M dist/ExtUtils-ParseXS/t/518-typemaps-compat.t
    R dist/ExtUtils-ParseXS/t/data/b.typemap
    R dist/ExtUtils-ParseXS/t/data/combined.typemap
    R dist/ExtUtils-ParseXS/t/data/confl_repl.typemap
    R dist/ExtUtils-ParseXS/t/data/confl_skip.typemap
    R dist/ExtUtils-ParseXS/t/data/conflicting.typemap
    R dist/ExtUtils-ParseXS/t/data/other.typemap
    R dist/ExtUtils-ParseXS/t/data/perl.typemap
    R dist/ExtUtils-ParseXS/t/data/simple.typemap
    A dist/ExtUtils-ParseXS/t/test_typemaps/b.typemap
    A dist/ExtUtils-ParseXS/t/test_typemaps/combined.typemap
    A dist/ExtUtils-ParseXS/t/test_typemaps/confl_repl.typemap
    A dist/ExtUtils-ParseXS/t/test_typemaps/confl_skip.typemap
    A dist/ExtUtils-ParseXS/t/test_typemaps/conflicting.typemap
    A dist/ExtUtils-ParseXS/t/test_typemaps/other.typemap
    A dist/ExtUtils-ParseXS/t/test_typemaps/perl.typemap
    A dist/ExtUtils-ParseXS/t/test_typemaps/simple.typemap

  Log Message:
  -----------
  ParseXS: rename t/data/ to t/test_typemaps

This directory just contains typemap files to be used by various
test files. Make the name give a clearer indication of its purpose.


  Commit: 99bada4aca625d2b7ab258723f813906593ac4e3
      
https://github.com/Perl/perl5/commit/99bada4aca625d2b7ab258723f813906593ac4e3
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/004-parse-xsub-declaration.t

  Log Message:
  -----------
  ParseXS: 004-parse-xsub-declaration.t: fix for 589

Fix up a test to work under perl 5.8.9.

This regex:  qr/\Q...\".../ was meant to match the two literal
characters backslash and double-quote, but that only worked correctly
from 5.10.0 onwards.


  Commit: 83dec28b85a79e0047e854cb734b4d1938e23ff5
      
https://github.com/Perl/perl5/commit/83dec28b85a79e0047e854cb734b4d1938e23ff5
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm

  Log Message:
  -----------
  ParseXS: enable + fix warnings in CountLines.pm

This private helper module had 'strict' enabled, but not warnings.
So enable them, and fix up a problem it reveals:

the destructor for the tied handle was trying to write the buffer
contents even if the buffer was empty. This is harmless, but was now
triggering a warning for some tests which tested for an error condition
that didn't produce any output, e.g.:

    ../dist/ExtUtils-ParseXS/t/002-parse-file-scope.t ................... 1/?
    print() on unopened filehandle FH at .../CountLines.pm line 44 during 
global destruction.

This is also a fix for running under 5.8.9, whose test harness rather
anti-socially invokes perl with -w. Which is how I got to know about the
warnings in the first place.


  Commit: 41d90b16970275ef02b4e5e2976337183ed41c50
      
https://github.com/Perl/perl5/commit/41d90b16970275ef02b4e5e2976337183ed41c50
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/Changes

  Log Message:
  -----------
  ParseXS: update Changes


  Commit: 8de3900963534d2ba640b9efdab1cff065711002
      
https://github.com/Perl/perl5/commit/8de3900963534d2ba640b9efdab1cff065711002
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/007-parse-input-output.t

  Log Message:
  -----------
  ParseXS: fix up two TODO tests

A couple of TODO tests were sort of guessing what C code *should* be
generated, and were getting it wrong. For the first:

- spurious backtick;

- no space after if;

- 1 arg not 2.

For the second:

- no space after if;

Since that C code wasn't being generated yet (hence the TODO tests),
they were happily passing without it being obvious that it was wrong.
Spotted by Tony C.


  Commit: a069c2aef728cb20e4de8fdedd65affa97d8afac
      
https://github.com/Perl/perl5/commit/a069c2aef728cb20e4de8fdedd65affa97d8afac
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/t/008-parse-xsub-keywords.t

  Log Message:
  -----------
  ParseXs: tweak test descriptions in t/008...t

A couple of tests incorrectly had "should die" in their test
descriptions, likely due to cut+paste thinkos.


  Commit: 1f637f1679e382b7bf4cf68b423a3f6bbd5522b1
      
https://github.com/Perl/perl5/commit/1f637f1679e382b7bf4cf68b423a3f6bbd5522b1
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/008-parse-xsub-keywords.t

  Log Message:
  -----------
  ParseXS: OVERLOAD: support ${} and @{}

The parser was silently skipping those two valid overload keys.

Also add tests for all currently legal overload keys.


  Commit: de984d160dca9f04fd4b5f8a6d5a4990ed0ff98c
      
https://github.com/Perl/perl5/commit/de984d160dca9f04fd4b5f8a6d5a4990ed0ff98c
  Author: David Mitchell <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
    M dist/ExtUtils-ParseXS/t/008-parse-xsub-keywords.t

  Log Message:
  -----------
  ParseXS: warn on forbidden OVERLOAD names

Previously, the OVERLOAD keyword just silently ignored any op names
which didn't seem syntactically valid. This commit makes it warn (but
still skip).

Note that the parser doesn't have a list of valid overload names.
For forwards compatibility, it just has a set of valid characters,
including \w and most of the standard punctuations characters, and
rejects anything else.


Compare: https://github.com/Perl/perl5/compare/2a13585038ec...de984d160dca

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to