Summary
Book::Bilingual v0.003 exposes a PerlOnJava parser bug: a valid POD
directive after executable code is parsed as Perl source. The module's
Book::Bilingual::Reader package fails to compile at =head1 ATTRIBUTES.
CPAN evidence
- Distribution:
Book::Bilingual v0.003
- CPAN run:
20260910-101908-8428
- Failure record:
FAIL Book::Bilingual::v0.003 Book::Bilingual
- Failing test:
t/60-reader.t
- PerlOnJava result: 37 earlier tests pass; the Reader test fails before
running any assertions
- System Perl result: all 65 tests pass after installing the declared
Mojolicious and Path::Tiny prerequisites into an isolated library
- Environment: pure Perl; no XS/native, display, network-service, or
platform prerequisite is involved
The failure reproduces on both the JVM and interpreter backends.
Minimal reproducer
package Example;
sub answer { 42 }
=encoding utf8
=cut
=head1 ATTRIBUTES
=cut
1;
Standard Perl accepts this file and loads the package. PerlOnJava reports:
syntax error at .../Reader.pm line 290, near "head1 ATTRIBUTES"
Compilation failed in require
CPAN failure details
Book::Bilingual::Reader contains executable code followed by POD beginning
with =encoding utf8, =cut, and =head1 ATTRIBUTES. The first five test
programs pass, while t/60-reader.t requires Book::Bilingual::Reader and
fails during compilation at that POD section. The author-only POD syntax test
is skipped as expected.
System Perl accepts the same source and the complete upstream suite passes.
The same syntax error occurs when loading the Reader module through both
PerlOnJava execution backends, so this is not a backend-specific runtime
failure or an unmet dependency.
Root cause
PerlOnJava's parser does not correctly transition back into POD mode for this
valid directive sequence after code has ended. It treats the head1
directive text as Perl syntax instead of ignoring the POD block until the
next =cut.
This is a PerlOnJava parser compatibility defect, not an error in the
Book::Bilingual distribution.
Expected fix
Recognize valid POD directives after executable code, including =encoding,
=cut, and section directives such as =head1, and exclude their contents
from Perl parsing. Preserve existing handling of POD at other source
locations.
Add permanent project-owned regression coverage for a module containing
executable code followed by this POD sequence. Validate the regression with
system Perl first, then on both JVM and interpreter backends.
Summary
Book::Bilingualv0.003 exposes a PerlOnJava parser bug: a valid PODdirective after executable code is parsed as Perl source. The module's
Book::Bilingual::Readerpackage fails to compile at=head1 ATTRIBUTES.CPAN evidence
Book::Bilingualv0.00320260910-101908-8428FAIL Book::Bilingual::v0.003 Book::Bilingualt/60-reader.trunning any assertions
MojoliciousandPath::Tinyprerequisites into an isolated libraryplatform prerequisite is involved
The failure reproduces on both the JVM and interpreter backends.
Minimal reproducer
Standard Perl accepts this file and loads the package. PerlOnJava reports:
CPAN failure details
Book::Bilingual::Readercontains executable code followed by POD beginningwith
=encoding utf8,=cut, and=head1 ATTRIBUTES. The first five testprograms pass, while
t/60-reader.trequiresBook::Bilingual::Readerandfails during compilation at that POD section. The author-only POD syntax test
is skipped as expected.
System Perl accepts the same source and the complete upstream suite passes.
The same syntax error occurs when loading the Reader module through both
PerlOnJava execution backends, so this is not a backend-specific runtime
failure or an unmet dependency.
Root cause
PerlOnJava's parser does not correctly transition back into POD mode for this
valid directive sequence after code has ended. It treats the
head1directive text as Perl syntax instead of ignoring the POD block until the
next
=cut.This is a PerlOnJava parser compatibility defect, not an error in the
Book::Bilingual distribution.
Expected fix
Recognize valid POD directives after executable code, including
=encoding,=cut, and section directives such as=head1, and exclude their contentsfrom Perl parsing. Preserve existing handling of POD at other source
locations.
Add permanent project-owned regression coverage for a module containing
executable code followed by this POD sequence. Validate the regression with
system Perl first, then on both JVM and interpreter backends.