Summary
PerlOnJava emits false Ambiguous call resolved as CORE::try() and CORE::catch() warnings when compiling modules that import try/catch from Try::Tiny. These warnings make otherwise passing CPAN tests fail under Test::NoWarnings.
Reproduction
The issue was observed while testing TBX::Min version 0.08 in CPAN random run 20260921-124328-13959 at PerlOnJava commit d8e4fd417.
The distribution's standard Perl suite passes all 162 tests. Under PerlOnJava, both the JVM backend and interpreter backend reproduce the warnings with the dependency set used by the run. A minimal load reproducer is:
use DateTime::Format::Strptime;
The warnings include:
Ambiguous call resolved as CORE::try(), qualify as such or use &
Ambiguous call resolved as CORE::catch(), qualify as such or use &
They originate in Try::Tiny consumers including DateTime::Format::Strptime, Module::Implementation, DateTime, and DateTime::TimeZone. PerlOnJava reports these warnings even though the code imports and calls the Try::Tiny functions; standard Perl does not report them for the same suite.
CPAN impact
TBX::Min reports 8 failed test programs out of 10 and 8 failed subtests out of 162. In each affected test program, the only failure is the Test::NoWarnings check; functional assertions pass.
The distribution contains no XS or native code, so no native reverse-dependency analysis is applicable.
Expected behavior
PerlOnJava should match standard Perl warning behavior: importing try and catch from Try::Tiny should not produce false ambiguity warnings merely because Perl has a CORE::try construct.
Environment
- PerlOnJava backends: JVM and interpreter
- Standard Perl oracle: Perl 5.42.2 on macOS
- Affected dependency:
DateTime::Format::Strptime 1.80
- CPAN distribution:
TBX::Min 0.08
Summary
PerlOnJava emits false
Ambiguous call resolved as CORE::try()andCORE::catch()warnings when compiling modules that importtry/catchfromTry::Tiny. These warnings make otherwise passing CPAN tests fail underTest::NoWarnings.Reproduction
The issue was observed while testing
TBX::Minversion 0.08 in CPAN random run20260921-124328-13959at PerlOnJava commitd8e4fd417.The distribution's standard Perl suite passes all 162 tests. Under PerlOnJava, both the JVM backend and interpreter backend reproduce the warnings with the dependency set used by the run. A minimal load reproducer is:
use DateTime::Format::Strptime;The warnings include:
They originate in
Try::Tinyconsumers includingDateTime::Format::Strptime,Module::Implementation,DateTime, andDateTime::TimeZone. PerlOnJava reports these warnings even though the code imports and calls theTry::Tinyfunctions; standard Perl does not report them for the same suite.CPAN impact
TBX::Minreports 8 failed test programs out of 10 and 8 failed subtests out of 162. In each affected test program, the only failure is theTest::NoWarningscheck; functional assertions pass.The distribution contains no XS or native code, so no native reverse-dependency analysis is applicable.
Expected behavior
PerlOnJava should match standard Perl warning behavior: importing
tryandcatchfromTry::Tinyshould not produce false ambiguity warnings merely because Perl has aCORE::tryconstruct.Environment
DateTime::Format::Strptime1.80TBX::Min0.08