# New Ticket Created by Will Coleda # Please include the string: [perl #49758] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=49758 >
% make perl6 #in the top level directory. % ./perl6 > $a=1; No scope found for PAST::Var '$a' > my $a=1; Bus error This error ONLY happens in interactive mode; given perl6 is basically invoking the HLLCompiler method for this, I suspect an issue with the toolkit rather than perl6 itself. >From IRC: <lathos> After the interpreter panics it for some reason starts wrapping up new code as closures instead of subs. <lathos> Those closures have no outer scope, and so the code which invokes a closure explodes on them. Running with "./perl6 --target=pir", you can see that the second line above generates the following code: .namespace .sub "_block15" :outer("_block10") .lex "$_", $P16 .lex "$/", $P17 .lex "$!", $P18 new $P19, "Integer" assign $P19, 3 new $P20, "Undef" .lex "$a", $P20 eq_addr $P20, $P19, copy_21 morph $P20, "Undef" assign $P20, $P19 copy_21: .return ($P20) .end -- Will "Coke" Coleda