Summary
Symbol::Util 0.0203 exposes incorrect package-stash and typeglob-slot behavior in PerlOnJava. The distribution is pure Perl and its unchanged upstream suite passes under system Perl, so this is a PerlOnJava language-compatibility defect rather than an XS, service, or environment limitation.
Fixing the underlying semantics should benefit other modules that inspect or modify symbol tables.
Results
From CPAN random-tester run 20260825-132251-83655:
- PerlOnJava: 262/307 assertions pass; 45 fail across 4/8 test programs.
- System Perl in the same usable environment: 307/307 assertions pass across all 8 test programs.
Failing upstream test files:
t/10use.t: a package expected to have no imported functions unexpectedly contains a DATA stash entry.t/40delete_glob.t: selective and complete glob deletion/restoration mishandles SCALAR, ARRAY, HASH, CODE, and IO slots.t/70export_glob.t: exporting individual slots can expose unwanted CODE slots, including when the selected source slot does not exist.t/80export_package.t: filtered exports and unexports leave unwanted CODE slots, and mixed-slot unexport operations do not remove the requested slots correctly.
The other four test files pass, including basic glob fetching, stash access, subroutine deletion, and glob-slot listing.
Expected behavior
PerlOnJava should preserve Perl's independent typeglob-slot semantics:
- assigning one slot must not make unrelated slots visible;
- deleting selected slots must retain only the intended slots;
- deleting a complete glob through its package stash must remove it;
- restoring backed-up slots must reproduce the original glob;
- package stashes must not acquire unrelated
DATA or phantom CODE entries.
Ecosystem impact
A targeted MetaCPAN reverse-dependency lookup found four released distributions with direct runtime requirements on Symbol::Util:
- MySQL-Util
- namespace-functions
- Test-Assert
- constant-boolean
None were classified as recent dependants. The direct count is modest, but this issue concerns reusable core Perl semantics and may affect modules that manipulate typeglobs without declaring Symbol::Util.
Suggested acceptance criteria
- Add focused project-owned regression tests for independent glob-slot assignment, deletion/restoration through a package stash, and absence of phantom
CODE/DATA entries. - Validate those tests with system Perl first.
- Make the focused tests pass on both PerlOnJava backends.
- Make the unchanged Symbol::Util 0.0203 suite pass.
Summary
Symbol::Util 0.0203 exposes incorrect package-stash and typeglob-slot behavior in PerlOnJava. The distribution is pure Perl and its unchanged upstream suite passes under system Perl, so this is a PerlOnJava language-compatibility defect rather than an XS, service, or environment limitation.
Fixing the underlying semantics should benefit other modules that inspect or modify symbol tables.
Results
From CPAN random-tester run
20260825-132251-83655:Failing upstream test files:
t/10use.t: a package expected to have no imported functions unexpectedly contains aDATAstash entry.t/40delete_glob.t: selective and complete glob deletion/restoration mishandlesSCALAR,ARRAY,HASH,CODE, andIOslots.t/70export_glob.t: exporting individual slots can expose unwantedCODEslots, including when the selected source slot does not exist.t/80export_package.t: filtered exports and unexports leave unwantedCODEslots, and mixed-slot unexport operations do not remove the requested slots correctly.The other four test files pass, including basic glob fetching, stash access, subroutine deletion, and glob-slot listing.
Expected behavior
PerlOnJava should preserve Perl's independent typeglob-slot semantics:
DATAor phantomCODEentries.Ecosystem impact
A targeted MetaCPAN reverse-dependency lookup found four released distributions with direct runtime requirements on Symbol::Util:
None were classified as recent dependants. The direct count is modest, but this issue concerns reusable core Perl semantics and may affect modules that manipulate typeglobs without declaring Symbol::Util.
Suggested acceptance criteria
CODE/DATAentries.