1
class Perl6::Compiler::Module is Perl6::Compiler::Package;
5
# Modules don't support methods; just give back some dummy table.
7
if $*SCOPE eq '' || $*SCOPE eq 'has' {
8
pir::printerr("Useless declaration of has-scoped " ~ $*METHODTYPE ~
9
" in a module; add our or my to install it in the lexpad or namespace\n");
14
# Accessor for attributes hash.
16
pir::die('You can not add an attribute to a module; use a class or role');
19
# This method drives the code generation and fixes up the block.
20
method finish($block) {
21
if $!scope eq 'our' || $!scope eq '' {
22
$block.blocktype('immediate');
23
$block.namespace(Perl6::Grammar::parse_name(~$!name));
26
pir::die("Cannot handle scope declarator " ~ $!scope ~ " on modules yet");