Skip to content

fix: support Tie::File::Indexed file-backed arrays #1153

Description

@fglock

Failure

Tie::File::Indexed 0.09 fails under PerlOnJava in CPAN run 20260827-102606-1637.

The distribution is pure Perl and configures and builds successfully. Its test suite then reports 21 failed subtests out of 94 in the JVM backend:

  • t/02_basic.t: 12/58 failures, including assign: content, append: push, append: content, consolidate, copy: file, rename: content, move: content, and reopen/rw: content.
  • t/03_utf8.t: 2/4 failures.
  • t/04_json.t: 2/5 failures.
  • t/05_storable.t: 5/20 failures.

The common symptom is that indexed-file writes appear successful, but later reads report an empty index or missing content. File-size checks after consolidation/pop are also incorrect.

Baseline

The same upstream release passes its complete suite under system Perl:

Files=5, Tests=94
Result: PASS

Backend coverage

  • JVM backend: reproduces the upstream failure summary above.
  • Interpreter backend: the initial assignment fails, then execution aborts while handling the tied array with Can't locate object method "size" via package "Tie::File::Indexed" at Tie/File/Indexed.pm line 779.

Reproduction

Obtain Tie-File-Indexed-0.09, build it with its normal Makefile.PL, then run its upstream tests with PerlOnJava:

timeout 120 /path/to/jperl -Iblib/lib t/02_basic.t
timeout 120 /path/to/jperl --interpreter -Iblib/lib t/02_basic.t

The JVM failure also occurs in the full make test suite. Investigation should focus on the interaction of tied-array indexed storage with filehandle seek/tell/read/write/reopen operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions