Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
silence warning when loading modules
  • Loading branch information
FROGGS committed Sep 1, 2015
1 parent f010b7b commit 269107e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/CompUnit.pm
Expand Up @@ -110,7 +110,7 @@ RAKUDO_MODULE_DEBUG("Precomping with %*ENV<RAKUDO_PRECOMP_WITH>")

my @MODULES = nqp::clone(@*MODULES // ());
for @MODULES -> $m {
if $m<module> eq $!name {
if $m<module> && $m<module> eq $!name {
nqp::die("Circular module loading detected involving module '$!name'");
}
}
Expand All @@ -136,12 +136,12 @@ RAKUDO_MODULE_DEBUG("Precomping with %*ENV<RAKUDO_PRECOMP_WITH>")
@*MODULES[*-1] = { line => $line };
}

my %trace = { module => $!name, filename => %chosen<pm> };
my $trace = { module => $!name, filename => %chosen<pm> };
my $preserve_global := nqp::ifnull(nqp::gethllsym('perl6', 'GLOBAL'), Mu);
@*MODULES.push: %trace;
@*MODULES.push: $trace;

if %chosen<load> {
%trace<precompiled> = %chosen<load>;
$trace<precompiled> = %chosen<load>;
RAKUDO_MODULE_DEBUG("loading ", %chosen<load>) if $?RAKUDO_MODULE_DEBUG;
my %*COMPILING := nqp::hash();
my $*CTXSAVE := self;
Expand Down

0 comments on commit 269107e

Please sign in to comment.