-
Couldn't load subscription status.
- Fork 13
Description
- The docs state (and have stated for many years) that a
unitdeclaration at the beginning of a file may be preceded only by comments andusestatements. - However, any declaration of
sub EXPORTmust precede theunitdeclaration. - Neither requirement seems to be tested in any roast tests that I could find (but I'm still a novice at searching in the roast repo).
The blocked docs issue Raku/doc#2148 is over seven years old, and the problem it describes is still in the current docs.
The statement at issue in the docs is in https://docs.raku.org/language/syntax#package,_module,_class,_role,_and_grammar_declaration and is currently worded as:
you can declare a
unitpackage at the start of the file (preceded only by comments orusestatements),
The conflicting (assuming that unit packages can make use of sub EXPORT) statement is in https://docs.raku.org/language/modules#EXPORT :
Please note that
EXPORTcan't be declared inside a package because it is part of the compunit rather than the package.
This issue is a re-open of the closed rakudo issue rakudo/rakudo#2020 as a problem-solving issue, as suggested at the time that issue was closed.