The following program works fine in pugs r17041 (which is the rev of /usr/bin/pugs on feather):
my $r=\{say $x+1}; my $x=2; $r(); With r17041, this gives 3; However, on the latest pugs (r17615 or later), it gives an error: *** Unexpected "$r" expecting "=", "::", context, ":" or "(" Variable "$x" requires predeclaration or explicit package name at pugs_var_bug.p6 line 1, column 4 It would think that the r17041 result is correct. ------- There is also a scoping issue in r17615: my $v=1; if ($v) { map ->$v {$v},(2); } else { $v; } With r17041, this gives 2; With r17615 it gives an error: *** Unexpected end of input expecting "::" Variable "$v" requires predeclaration or explicit package name at pugs_scoping_bug.p6 line 6, column 15 Now, if I change $v to $x in the pointy sub, it works fine. ----- Both seems like bugs to me, but can someone confirm that? Thanks, Wim -- If it's pointless, what's the point? If there is a point to it, what's the point? (Tibor Fischer, "The Thought Gang")