in reply to Re: FPE not deferred in 5.36
in thread FPE not deferred in 5.36

I can confirm that with ints, it emits "Maximal count of pending signals". It still outputs the line number, as you noted. Probably not worth including into Syntax::Construct, as the change in behaviour is hard to test and the code probably doesn't depend on that (the user debugging the code, though, might well do).

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^3: FPE not deferred in 5.36
by hv (Prior) on May 31, 2022 at 15:49 UTC

    This is rather strange - removing the 'local' stops the die message from showing up:

    % perl-5.34.0 -MMath::GMP -wle 'local $SIG{FPE} = sub { die "divide by + zero" }; $z=Math::GMP->new(1); print $z / 0' Maximal count of pending signals (120) exceeded at -e line 1. divide by zero at -e line 1. % % perl-5.34.0 -MMath::GMP -wle '$SIG{FPE} = sub { die "divide by zero" + }; $z=Math::GMP->new(1); print $z / 0' Maximal count of pending signals (120) exceeded at -e line 1. %

    I don't know why that's occurring. I guess it's possible there's a bug here, but I'm not sure how I might start investigating it. If anything I'd have imagined it working the other way round.

      If there's a bug, we'll need to find a different reproducer, as the fix to FPE makes the behaviour of the code identical in 5.36.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]