Branch: refs/heads/davem/xs_no_mod
  Home:   https://github.com/Perl/perl5
  Commit: 597af478ef4ec67b67bc492edaf929a221206e45
      
https://github.com/Perl/perl5/commit/597af478ef4ec67b67bc492edaf929a221206e45
  Author: David Mitchell <[email protected]>
  Date:   2025-12-20 (Sat, 20 Dec 2025)

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

  Log Message:
  -----------
  ParseXS: allow XS files with no XS again

GH #24016

ParseXS / xsubpp allowed .xs files to contain only C code; i.e. no XS
code. A warning was issued about about a missing MODULE line, but the C
contents of the file was emitted as-is.

My recent refactoring broke this - it was now generating a C code file
with zero lines. This was because ParseXS now splits the parsing and
code-emitting into two separate phases, and this code during parsing:

     warn "Didn't find a 'MODULE ... PACKAGE ... PREFIX' line\n";
     exit 0; # Not a fatal error for the caller process

was now exiting before any lines had been emitted.

The fix is to not suddenly exit, but instead continue with pared-down
parsing and code emitting.



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

Reply via email to