You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1..2
ok 1 - warnings
Number found where operator expected (Do you need to predeclare "caller"?) at /home/perlbot/perl5/custom/5.40.0/lib/5.40.0/warnings.pm line 454, near "caller 1"
# syntax error at /home/perlbot/perl5/custom/5.40.0/lib/5.40.0/warnings.pm line 454, near "caller 1"
# Execution of /home/perlbot/perl5/custom/5.40.0/lib/5.40.0/warnings.pm aborted due to compilation errors.
# Compilation failed in require at (eval 15) line 1.
# BEGIN failed--compilation aborted at (eval 15) line 1.
not ok 2 - warnings
# Failed test 'warnings'
# at (IRC) line 15.
# Looks like you failed 1 test of 2.
This is caused by Sub::Uplevel overriding CORE::GLOBAL::caller, which isn't shared into the Safe container. This should probably be considered a core bug, where the override should be ignored since it isn't available inside the Safe container.
I don't think there's really anything that this module can do to work around this. Sub::Uplevel is a terrible tool, but is needed for this module to operate correctly. And Sub::Uplevel can't fix how Safe or core is behaving.
Demonstration of the problem without Test::Exception or Sub::Uplevel:
Activity
Fix tests for TrEd::Macros
haarg commentedon Feb 18, 2025
This is caused by Sub::Uplevel overriding
CORE::GLOBAL::caller, which isn't shared into the Safe container. This should probably be considered a core bug, where the override should be ignored since it isn't available inside the Safe container.I don't think there's really anything that this module can do to work around this. Sub::Uplevel is a terrible tool, but is needed for this module to operate correctly. And Sub::Uplevel can't fix how Safe or core is behaving.
Demonstration of the problem without Test::Exception or Sub::Uplevel:
choroba commentedon Feb 18, 2025
Interestingly, replacing Test::Exception with Test::Trap seems to fix this particular issue.
haarg commentedon Feb 18, 2025
Test::Trap has a different API that doesn't require Sub::Uplevel to work around problems. Test::Fatal also doesn't suffer from this problem.
Fix tests for TrEd::Macros
Fix tests for TrEd::Macros