develooper Front page | perl.perl6.compiler | Postings from October 2011

[perl #101440] [BUG] Closures created inside BEGIN blocks see the wrong outer lexpad in Rakudo

From:
Carl Mäsak
Date:
October 16, 2011 03:56
Subject:
[perl #101440] [BUG] Closures created inside BEGIN blocks see the wrong outer lexpad in Rakudo
Message ID:
rt-3.6.HEAD-31297-1318762573-1882.101440-82-0@perl.org
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #101440]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=101440 >


<masak> nom: my $c; my $name; BEGIN { $c = { say "OH HAI $name" } };
$name = "masak"; $c()
<p6eval> nom ea25f3: OUTPUT«Use of uninitialized value in string
context␤OH HAI ␤»
<masak> I'd expect the above to say "OH HAI masak".
<masak> are my expectations too high? :)
<jnthn> masak: Seems reasonableish... :)
* masak submits rakudobug



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