Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 7fdc8f34fd20e8d4bec8de19f64c869b152f1249
      
https://github.com/Perl/perl5/commit/7fdc8f34fd20e8d4bec8de19f64c869b152f1249
  Author: Lukas Mai <lukasmai....@gmail.com>
  Date:   2025-02-15 (Sat, 15 Feb 2025)

  Changed paths:
    M pod/perlvar.pod
    M t/op/die_goto.t

  Log Message:
  -----------
  perlvar: fix $SIG{__DIE__} POD re: exiting from a sub

The documentation claims that you can make die() not throw an exception
by setting a $SIG{__DIE__} handler that performs a non-local exit via
goto/next/last/redo LABEL or throws another exception. The latter is
true, but it just replaces one exception by another (you still end up
throwing some exception). The former has never worked as advertised: You
cannot transfer control out of a %SIG handler (except by regular
return).

(At some point, "goto" was changed to "goto &sub", which is even
wronger: "goto &sub" is effectively just a function call. It definitely
does not stop exception processing/stack unwinding.)

"Fixes" #8987 by making the documentation match the implementation. (It
does not make the implementation match the documentation, which is what
Father Chrysostomos was working on in 2012, but there have been no
updates since then. In the meantime, this is better than nothing.)



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to