Skip to content

Data::Printer support: Phase 3-6 fixes#434

Merged
fglock merged 6 commits intomasterfrom
feature/data-printer-phase3
Apr 4, 2026
Merged

Data::Printer support: Phase 3-6 fixes#434
fglock merged 6 commits intomasterfrom
feature/data-printer-phase3

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented Apr 3, 2026

Summary

Improve Data::Printer module compatibility with a series of fixes across Phases 3-6. Data::Printer test results improved to 576/624 subtests passing (92.3%).

Phase 3 - B module stubs

  • Add B::CV::ROOT (returns B::OP, all subs have bodies on JVM)
  • Add B::CV::const_sv (returns \0 for non-constant subs)
  • Add B::class() utility function (strips B:: prefix from ref)
  • Add B::NULL package (for undefined/stub sub detection)
  • Add B::SV::RV (unwraps one level of reference)

Phase 4 - Module fixes

  • charnames::viacode: Add Charnames.java using ICU4J UCharacter.getName() with Perl fallback
  • File::Temp: Export SEEK_SET/SEEK_CUR/SEEK_END with :seekable tag
  • Glob tilde expansion: Add expandTilde() in ScalarGlobOperatorHelper, reads $ENV{HOME} first

Phase 5 - Tied variable ClassCastException fix

  • Add instanceof guards in TieScalar.tiedDestroy() and tiedUntie()
  • Fix TieOperators.untie() and tied() for proxy entries

Phase 6 - Multiple Data::Printer-specific fixes

  • UNIVERSAL methods: Set code.packageName/code.subName in PerlModuleBase.registerMethod()
  • $! dualvar: Change ErrnoVariable to use DUALVAR type with DualVar value, add local $! support
  • Tied FETCH caching: Cache FETCH result in TieScalar.tiedFetch() so untie restores last fetched value
  • Digest::SHA: Fix @isa to include Digest::base (was overwritten by subsequent assignment)

Remaining failures (48/624)

  • ~28 subtests: Weak refs/refcount (fundamental JVM limitation)
  • ~10 subtests: Profile type numbering differences
  • 4 subtests: Read-only constant detection
  • 2 subtests: B::Deparse (not implemented)
  • 2 subtests: LVALUE ref detection
  • 1 subtest: FORMAT ref, 1 DBI filter, 1 ContentType hex dump, 1 color test

Test plan

  • make passes (all unit tests)
  • Data::Printer test suite: 576/624 subtests passing (92.3%)
  • $! dualvar works with and without local
  • UNIVERSAL methods visible in class introspection
  • Glob tilde expansion respects $ENV{HOME}
  • Tied scalar untie restores FETCH result
  • Digest::SHA recognized by Data::Printer Digest filter

Generated with Devin

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant