# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #66394]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=66394 >


<masak> from S12: "The first form [the 'role A;' one] is allowed only
as the first declaration in a compilation unit (that is, file or eval
string)." does that mean I can have use statements before the
declaration?
<masak> ISTR there was a spec change to allow exactly that.
<pmichaud> I know it came up for discussion; I didn't see the spec change.
<pmichaud> let me see if STD.pm changed, though
<pmichaud> (Rakudo followed STD.pm more than the spec, there.)
<pmichaud> std:  say 'ok';  module Bar;  say 'ok!';
<p6eval> std 27032: OUTPUT«ok 00:02 35m␤»
<masak> oh, STD.pm is very permissive.
<pmichaud> std:  say 'ok';  module Bar;  say 'ok!';  module Foo;   say 'no!';
<p6eval> std 27032: OUTPUT«##### PARSE FAILED ##### [...]
<pmichaud> it looks like STD.pm is allowing only one   "module Foo;"
per compilation unit, but anything can come before it.
<masak> ok.
<masak> maybe that's sane.
<masak> better than to whitelist things, to be sure.
<masak> in that case, all that remains is a Rakudobug.

Reply via email to