Skip to content

Support Class::MethodMaker without XS #1147

Description

@fglock

Summary

Class::MethodMaker 2.25 cannot load on PerlOnJava because the distribution
requires its XS implementation:

Can't load loadable object for module Class::MethodMaker: no Java XS implementation available

Downstream impact

CPAN test run 20260826-133502-83100 found that Term::ProgressBar 2.23
cannot load because it requires Class::MethodMaker. Its 12 test files then
fail during module loading, including t/02_term_progressbar_io.t,
t/compat.t, t/eta-linear.t, t/name.t, and t/v2-simple.t.

The same upstream Term::ProgressBar suite passes under system Perl with the
exact Class::MethodMaker and Term::ReadKey prerequisites installed: 12
files and 143 tests.

Term::ReadKey is already bundled by PerlOnJava and was verified to load on
both backends, including with the CPAN test overlay. It is not the cause of
this failure.

Scope and priority

Class::MethodMaker contains MethodMaker.xs. CPAN metadata reports 28
reverse dependants (one recent); examples include Term::ProgressBar,
Devel::PerlySense, Text::Indent, and RDF::Simple.

Proposed investigation

Before implementing Java equivalents for the XS surface, determine whether
the distribution has a usable pure-Perl fallback (or can be configured to use
one) that preserves the APIs needed by its downstream users. If not, add a
PerlOnJava implementation for the required behavior.

Acceptance criteria

  • use Class::MethodMaker works without a native library.
  • The required accessor/method-generator behavior is covered by a
    project-owned regression test.
  • Term::ProgressBar 2.23 passes its upstream suite, including the stable
    files listed above, on both PerlOnJava backends.

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