Skip to content

docs: add CPAN compatibility reports for Scalar::Util and Memoize#497

Merged
fglock merged 4 commits intomasterfrom
docs/cpan-reports-scalar-util-memoize
Apr 13, 2026
Merged

docs: add CPAN compatibility reports for Scalar::Util and Memoize#497
fglock merged 4 commits intomasterfrom
docs/cpan-reports-scalar-util-memoize

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented Apr 13, 2026

Summary

Adds detailed CPAN compatibility investigation reports for two important Perl core modules:

Scalar::Util (Scalar-List-Utils 1.70)

  • 606/816 subtests pass (74.3%) against the CPAN test suite
  • All 14 standard exported functions are implemented in the Java backend
  • Key gaps: isvstring is a stub (always false), tainted always returns false (no taint mode), readonly only detects compile-time constants
  • Most test failures are actually in List::Util and Sub::Util functions (mesh, zip, set_subname, reduce block calling), not Scalar::Util itself
  • Scalar::Util-specific functions (blessed, reftype, weaken, etc.) are solid

Memoize 1.17

  • Core functionality fully working -- memoize, unmemoize, flush_cache, NORMALIZER, cache config all pass
  • 7/16 test files pass; all 5 failures are peripheral:
    • correctness.t: StackOverflowError from 100k-deep recursion test (fixable with -Xss256m)
    • threadsafe.t: Requires threads (not available)
    • tie.t/tie_db.t: DB_File.pm shim has infinite recursion bug
    • tie_storable.t: 1 subtest short
  • Good candidate for bundling -- pure Perl, all dependencies satisfied
  • With targeted fixes could reach 11/16 passing (4 skipped for missing DB backends)

Files

  • dev/cpan-reports/Scalar-Util.md -- full report with per-function and per-test breakdown
  • dev/cpan-reports/Memoize.md -- full report with dependency analysis and bundling instructions

Test plan

  • Reports contain accurate test counts verified by running jcpan -t
  • Function implementation status verified against Java source code
  • Dependency analysis verified against bundled modules

Generated with Devin

fglock and others added 4 commits April 13, 2026 08:43
Detailed investigation of both modules against their CPAN test suites:

- Scalar::Util (Scalar-List-Utils 1.70): 606/816 subtests pass (74.3%).
  All 14 exported functions implemented; isvstring is a stub,
  tainted always returns false (no taint mode), readonly partial.
  Most failures are in List::Util/Sub::Util functions.

- Memoize 1.17: Core functionality fully working (7/16 test files pass).
  All failures are peripheral: deep recursion stack overflow,
  threads not available, DB_File shim bug. Good bundling candidate.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Scalar::Util:
- Fix isvstring() to actually check VSTRING type instead of always
  returning false. The VSTRING type infrastructure was already complete;
  only the isvstring() function was missing the check.

List::Util:
- Implement zip, zip_shortest, zip_longest (returns list of arrayrefs)
- Implement mesh, mesh_shortest, mesh_longest (returns flat interleaved list)
- These 6 functions were declared in @EXPORT_OK but had no Java backend

Memoize:
- Bundle Memoize 1.17 from perl5/cpan/Memoize/ into the JAR
- Add import-perl5 config entries for Memoize.pm and Memoize/ submodules
- Pure Perl module, all dependencies already satisfied

Plan documents:
- Add dev/modules/scalar_util.md with full bug analysis and fix plan
- Add dev/modules/memoize.md with dependency analysis and bundling plan

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Add passing CPAN tests to the bundled module test suite:

Scalar-List-Utils (13 tests):
  any-all, blessed, isvstring, max, maxstr, mesh, minstr,
  prototype, readonly, rt-96343, stack-corruption, sum0, zip

Memoize (7 tests):
  basic, cache, expmod, expmod_t, flush, normalize, unmemoize

All 20 tests pass under make test-bundled-modules.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@fglock fglock merged commit 7a3992f into master Apr 13, 2026
2 checks passed
@fglock fglock deleted the docs/cpan-reports-scalar-util-memoize branch April 13, 2026 08:01
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