Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Alas, this code is needed still
To correctly identify which directories were searched if a compunit load fails.

This reverts commit 22b0fec.
  • Loading branch information
lizmat committed Aug 2, 2014
1 parent 22b0fec commit a6e278d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Perl6/ModuleLoader.nqp
Expand Up @@ -36,6 +36,20 @@ class Perl6::ModuleLoader does Perl6::ModuleLoaderVMConfig {
}

method search_path() {
# See if we have an @*INC set up, and if so just use that.
my $PROCESS := nqp::gethllsym('perl6', 'PROCESS');
if !nqp::isnull($PROCESS) && nqp::existskey($PROCESS.WHO, '@INC') {
my $INC := ($PROCESS.WHO)<@INC>;
if nqp::defined($INC) {
my @INC := $INC.FLATTENABLE_LIST();
if +@INC {
return @INC;
}
}
}

# Too early to have @*INC; probably no setting yet loaded to provide
# the PROCESS initialization.
my @search_paths;
@search_paths.push('.');
@search_paths.push('blib');
Expand Down

0 comments on commit a6e278d

Please sign in to comment.