On Sun, Jan 25, 2009 at 07:41:04AM -0800, Carl Mäsak wrote: > [...] > <TimToady> masak: yes, STD allows use before class Foo is Bar; > <TimToady> however it's not clear the p6 autorecognizer will work in that case > <TimToady> so you might have to start with 'use v6' > <masak> TimToady: I consider starting with 'use v6' good style anyway. > thanks for the good news. submitting rakudobug. :) > > So, um, the bug is... that Rakudo currently doesn't allow 'use' before > 'class Foo is Bar', whereas STD.pm does.
STD.pm currently (r25059) allows _any_ statement to occur prior to a "class Foo is Bar;" declaration, which seems to contradict S11: A module is declared with the C<module> keyword. There are two basic declaration syntaxes: module Foo; # rest of scope is in module Foo ... module Bar {...} # block is in module Bar The first form is allowed only as the first statement in the file. Rakudo is currently following the S11 definition. Perhaps we need a bit of clarification on the synopsis or STD.pm here. Pm