Skip Menu |
Report information
Id: 126459
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: gfldex <wenzel.peppmeyer [at] gmx.de>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



To: rakudobug [...] perl.org
From: "Wenzel P. P. Peppmeyer" <wenzel.peppmeyer [...] gmx.de>
Date: Mon, 26 Oct 2015 15:08:01 +0100 (CET)
Subject: LEAVE block skipped when die is called
Download (untitled) / with headers
text/plain 516b
sub f(){ ENTER { note '1) f has been entered' } LEAVE { note '2) f has been left' } say '3) here be dragons'; die '4) that happend to be deadly'; } f(); say '5) am I alive?'; CATCH { when X::AdHoc { note q{6) no, I'm dead}; exit 1 } } # OUTPUT: # 1) f has been entered # 3) here be dragons # 6) no, I'm dead # When die is replaced with fail, the LEAVE block is called. This is # neither specced nor documented. So it's either a bug or some mission # documentation.
Date: Mon, 26 Oct 2015 15:13:15 +0100 (CET)
Subject: Re: [perl #126459] LEAVE block skipped when die is called
To: perl6 via RT <perl6-bugs-followup [...] perl.org>
From: "Wenzel P. P. Peppmeyer" <wenzel.peppmeyer [...] gmx.de>
Download (untitled) / with headers
text/plain 248b
Removing 'exit 1' get's the LEAVE block called. In my eyes the LEAVE block should be called in that case too, because it may contain cleanup code and the CATCH may be in a different compunit, what will cause subtile bugs that are hard to test.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org