Import Pod modules and fix test infrastructure for Pod test suite#38
Merged
Import Pod modules and fix test infrastructure for Pod test suite#38
Conversation
This commit resolves 103 blocked test files (2,049 tests) that were failing due to missing Pod modules with 'Can't locate' errors. Changes: - Import Pod::Simple distribution (29 modules) from perl5/cpan/Pod-Simple/lib - Import Pod::Escapes from perl5/cpan/Pod-Escapes/lib - Import podlators (Pod::Man, Pod::Text) from perl5/cpan/podlators/lib - Import Pod::Usage from perl5/cpan/Pod-Usage/lib - Import Text::Tabs and Text::Wrap dependency modules - Import Test::Podlators and Test::RRA test helper modules Infrastructure improvements: - Update dev/import-perl5/config.yaml with Pod module imports - Fix test directory structure for podlators tests (preserve t/ parent) - Enhance perl_test_runner.pl to handle perl5_t tests with t/ subdirs - Update .gitignore to handle test output files Results: - Pod::Escapes tests: 63/63 passing (100%) - Pod::Usage tests: 34/42 passing (81%) - Pod::Simple tests now load and run - Test::Podlators accessible in @inc - Total: 42 Pod modules + 5 Test modules imported Tests previously blocked with 'Can't locate Pod/...' errors now execute successfully. Remaining test failures are due to PerlOnJava implementation limitations, not missing modules.
fglock
added a commit
that referenced
this pull request
Apr 26, 2026
Two related refcount fixes that recover Categories B and C from dev/prompts/dbic_final_postfix_for_inccode_plan.md without breaking DBIC, Moo, or Template. ## Fix 1: Internals::SvREFCNT includes localBindingExists `Internals::SvREFCNT(\@arr)` previously returned only the raw `refCount` value, which counts external refs (RVs, container slots) but excludes the lexical pad slot. Real Perl's SvREFCNT includes the pad slot — so a `my @arr` with no other refs reports SvREFCNT=1 (pad ownership), not 0. Add `+1` when `localBindingExists` is true. The `rc==0 && extra==0` guard preserves the legacy "fudge to 1 for live SVs with no owner" convention for anonymous tracked objects. Recovers `op/for-many.t` from 70/81 → 72/81 (matches master). ## Fix 2: list-assignment undef placeholder undoes copy incref `my (undef, $name) = @_;` patterns leaked +1 refCount per call on the discarded first arg, visible in `op/inccode.t` "no leaks" tests #61, #63 (perl bug #92252). Root cause: `RuntimeList.setFromList` materializes the RHS once into a flat array (`addToArray` → `addToScalar` → `set` → `setLarge`), which increments the referent's refCount on each ref-typed copy. The branch that handles assigned scalars already undoes this increment before discarding the copy. The `undef` placeholder branch was missing the corresponding undo. Mirrors the existing fix from the assigned-scalar branch. Recovers `op/inccode.t` 68/75 → 70/75 (matches master) and `op/inccode-tie.t` 72/75 → 74/75 (matches master). ## Verification - `make`: BUILD SUCCESSFUL. - DBIC fast check: 8/8 PASS (same as before). - Test counts: | file | before | after | master target | |---|---|---|---| | op/for-many.t | 70/81 | 72/81 | 72 | | op/inccode.t | 68/75 | 70/75 | 70 | | op/inccode-tie.t | 72/75 | 74/75 | 74 | Categories A (postfixderef.t #38 eval-string DESTROY) and D (for.t #103 do-block return + #105 undef element) remain — separate commits. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
fglock
added a commit
that referenced
this pull request
Apr 26, 2026
A rare NPE during END/global-destruction:
Cannot read field "type" because "arr" is null
GlobalDestruction.runGlobalDestruction line 42
`globalArrays.values()` and `globalHashes.values()` can contain
sporadic null entries during END (e.g. when a TEMP glob's array
slot is cleared mid-walk). The walk should defensively skip them
rather than crash and abort the entire END queue.
Visible in the postfixderef.t #38 test run after the END phase
trying to walk arrays whose `type` field had been already cleared
by a prior destructor.
Plan reference: dev/prompts/dbic_final_remaining_regressions_plan.md
Step 2 (NPE fix is a bundled subset; the full FREETMPS-at-do-block
work was deferred per fallback note — DBIC parity takes priority).
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
fglock
added a commit
that referenced
this pull request
Apr 26, 2026
Two related refcount fixes that recover Categories B and C from dev/prompts/dbic_final_postfix_for_inccode_plan.md without breaking DBIC, Moo, or Template. ## Fix 1: Internals::SvREFCNT includes localBindingExists `Internals::SvREFCNT(\@arr)` previously returned only the raw `refCount` value, which counts external refs (RVs, container slots) but excludes the lexical pad slot. Real Perl's SvREFCNT includes the pad slot — so a `my @arr` with no other refs reports SvREFCNT=1 (pad ownership), not 0. Add `+1` when `localBindingExists` is true. The `rc==0 && extra==0` guard preserves the legacy "fudge to 1 for live SVs with no owner" convention for anonymous tracked objects. Recovers `op/for-many.t` from 70/81 → 72/81 (matches master). ## Fix 2: list-assignment undef placeholder undoes copy incref `my (undef, $name) = @_;` patterns leaked +1 refCount per call on the discarded first arg, visible in `op/inccode.t` "no leaks" tests #61, #63 (perl bug #92252). Root cause: `RuntimeList.setFromList` materializes the RHS once into a flat array (`addToArray` → `addToScalar` → `set` → `setLarge`), which increments the referent's refCount on each ref-typed copy. The branch that handles assigned scalars already undoes this increment before discarding the copy. The `undef` placeholder branch was missing the corresponding undo. Mirrors the existing fix from the assigned-scalar branch. Recovers `op/inccode.t` 68/75 → 70/75 (matches master) and `op/inccode-tie.t` 72/75 → 74/75 (matches master). ## Verification - `make`: BUILD SUCCESSFUL. - DBIC fast check: 8/8 PASS (same as before). - Test counts: | file | before | after | master target | |---|---|---|---| | op/for-many.t | 70/81 | 72/81 | 72 | | op/inccode.t | 68/75 | 70/75 | 70 | | op/inccode-tie.t | 72/75 | 74/75 | 74 | Categories A (postfixderef.t #38 eval-string DESTROY) and D (for.t #103 do-block return + #105 undef element) remain — separate commits. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
fglock
added a commit
that referenced
this pull request
Apr 26, 2026
A rare NPE during END/global-destruction:
Cannot read field "type" because "arr" is null
GlobalDestruction.runGlobalDestruction line 42
`globalArrays.values()` and `globalHashes.values()` can contain
sporadic null entries during END (e.g. when a TEMP glob's array
slot is cleared mid-walk). The walk should defensively skip them
rather than crash and abort the entire END queue.
Visible in the postfixderef.t #38 test run after the END phase
trying to walk arrays whose `type` field had been already cleared
by a prior destructor.
Plan reference: dev/prompts/dbic_final_remaining_regressions_plan.md
Step 2 (NPE fix is a bundled subset; the full FREETMPS-at-do-block
work was deferred per fallback note — DBIC parity takes priority).
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit resolves 103 blocked test files (2,049 tests) that were failing due to missing Pod modules with 'Can't locate' errors.
Changes:
Infrastructure improvements:
Results:
Tests previously blocked with 'Can't locate Pod/...' errors now execute successfully. Remaining test failures are due to PerlOnJava implementation limitations, not missing modules.