Archive::Any fails to detect CPAN test archives on PerlOnJava

Open
#2,037 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java, perl
Domain
backend

Research direction

Start with the MIME detection and handler selection path that Archive::Any uses to pick an archive handler on PerlOnJava, since the bug is that a sample .tar.gz is reported as application/octet-stream. Reproduce by running t/10-simple.t from CPAN-Repository-0.010 on a current build, then compare with system Perl. Done when the test archive is detected as a supported format, the test passes on both JVM and interpreter backends, and a focused regression test covers the detection.

Written by the indexing model from the issue text.

Description

area:cpan-port area:io blocked:ownership bug

Summary

The CPAN::Repository 0.010 test suite fails on PerlOnJava when it adds sample distribution archives. Archive::Any detects a sample .tar.gz as application/octet-stream, reports that no handler is available, and returns an undefined archive object. Dist::Data then dies while calling extract on that value.

Evidence

  • CPAN distribution: CPAN-Repository-0.010 (OALDERS)
  • CPAN run: 20261111-090841-71684
  • Failing test: t/10-simple.t; 3 subtests pass before the test program exits with status 255.
  • PerlOnJava log diagnostic: No handler available for type 'application/octet-stream' from Archive::Any, followed by Can't call method "extract" on an undefined value from Dist::Data.
  • System Perl 5.42.2 on macOS passes the distribution suite: 4 test programs, 16 tests; t/10-simple.t passes.
  • PerlOnJava’s recorded run is the JVM backend. The interpreter backend was not separately checked.

The run installed pure-Perl dependencies including Archive::Any 0.0946, Dist::Data 0.007, and Dist::Metadata 0.927. The failing test uses bundled sample distribution archives and does not require a live CPAN service.

Expected behavior

PerlOnJava should identify the supported archive format and allow Archive::Any to extract the sample distribution, matching system Perl so CPAN::Repository can update its repository metadata.

Acceptance

  • Reproduce the focused test failure on the recorded run or a current PerlOnJava build.
  • Identify and fix why archive MIME detection or handler selection yields application/octet-stream for the test archive.
  • Add focused regression coverage and verify the test on system Perl and both PerlOnJava backends.
Dominant language
Perl
Stars
67
Forks
8
Avg merge
5h 12m
Merged PRs (30d)
131

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fglock/PerlOnJava

All issues in fglock/PerlOnJava

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.