develooper Front page | perl.perl6.compiler | Postings from March 2012

[perl #111866] [BUG] 'undo' won't fire unless the block is a 'try' block in Rakudo

Thread Previous
From:
Carl Mäsak
Date:
March 20, 2012 02:04
Subject:
[perl #111866] [BUG] 'undo' won't fire unless the block is a 'try' block in Rakudo
Message ID:
rt-3.6.HEAD-4610-1332234238-846.111866-82-0@perl.org
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #111866]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=111866 >


<moritz> r: ENTER { say 1 }
<p6eval> rakudo b2505b: OUTPUT«1␤»
<moritz> r: KEEP { say 1 }
<p6eval> rakudo b2505b: OUTPUT«1␤»
<moritz> r: UNDO { say 1 }
<p6eval> rakudo b2505b:  ( no output )

So far, so good. But:

<moritz> r: UNDO { say 'undone' }; die 'foo'
<p6eval> rakudo b2505b:  ( no output )
<moritz> that doesn't look right :/
* masak submits rakudobug
<masak> expected output: 'undone␤foo at blablabla'
<moritz> r: do { UNDO say "undone"; die "foo" }
<p6eval> rakudo b2505b: OUTPUT«foo␤  in block <anon> at /tmp/zh8VsY8sVT:1␤␤»
<masak> r: try { UNDO say "undone"; die "foo" }
<p6eval> rakudo b2505b: OUTPUT«undone␤»

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About