Summary
The InfoSys::FreeDB 0.92 CPAN regression fails only when use_ok imports the package. Standard Perl accepts this case (with a non-fatal undefined-import warning), but PerlOnJava makes it fatal.
Reproduction
timeout 120 env PERL5LIB=... jperl t/00-entry.t
Observed on both the JVM and interpreter backends:
not ok 1 - use InfoSys::FreeDB::Entry
Error: UNIVERSAL does not export anything
ok 2 - new_from_fn
ok 3 - mkdir
ok 4 - write
ok 5 - compare
System Perl passes all 5 tests. The CPAN tester record is a regression from the prior passing run and reports 54/55 subtests passing.
Root cause
Test::More::use_ok passes its diagnostic argument to the package import. Since InfoSys::FreeDB::Entry has no import method, PerlOnJava dispatches to UNIVERSAL::import, whose importUniversal implementation throws whenever more than one argument is present:
UNIVERSAL does not export anything
This should be compatible with standard Perl's undefined-import behavior and should not fail use_ok.
Suggested fix
Make the fallback UNIVERSAL::import path tolerate the diagnostic/import arguments when the target package does not define its own import method, while preserving errors for genuinely unsupported exports.
Observed by the CPAN compatibility tester in the InfoSys::FreeDB regression run.
Summary
The InfoSys::FreeDB 0.92 CPAN regression fails only when
use_okimports the package. Standard Perl accepts this case (with a non-fatal undefined-import warning), but PerlOnJava makes it fatal.Reproduction
Observed on both the JVM and interpreter backends:
System Perl passes all 5 tests. The CPAN tester record is a regression from the prior passing run and reports 54/55 subtests passing.
Root cause
Test::More::use_okpasses its diagnostic argument to the package import. SinceInfoSys::FreeDB::Entryhas no import method, PerlOnJava dispatches toUNIVERSAL::import, whoseimportUniversalimplementation throws whenever more than one argument is present:This should be compatible with standard Perl's undefined-import behavior and should not fail
use_ok.Suggested fix
Make the fallback
UNIVERSAL::importpath tolerate the diagnostic/import arguments when the target package does not define its own import method, while preserving errors for genuinely unsupported exports.Observed by the CPAN compatibility tester in the InfoSys::FreeDB regression run.