Created
August 7, 2011 12:55
-
-
Save jnthn/1130351 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/ModuleLoader.pm b/src/Perl6/ModuleLoader.pm | |
index 6800c88..d31f437 100644 | |
--- a/src/Perl6/ModuleLoader.pm | |
+++ b/src/Perl6/ModuleLoader.pm | |
@@ -85,6 +85,7 @@ class Perl6::ModuleLoader { | |
method load_module($module_name, $cur_GLOBALish) { | |
# Locate all the things that we potentially could load. Choose | |
# the first one for now (XXX need to filter by version and auth). | |
+pir::say("# Looking for $module_name ..."); | |
my @prefixes := self.search_path(); | |
my @candidates := self.locate_candidates($module_name, @prefixes); | |
if +@candidates == 0 { | |
@@ -92,6 +93,12 @@ class Perl6::ModuleLoader { | |
pir::join(', ', @prefixes)); | |
} | |
my %chosen := @candidates[0]; | |
+if %chosen<load> { | |
+ pir::say("# ...chosen pre-comp candidate " ~ %chosen<load>); | |
+} | |
+else { | |
+ pir::say("# ...chosen pm candidate " ~ %chosen<pm>); | |
+} | |
# If we didn't already do so, load the module and capture | |
# its mainline. Otherwise, we already loaded it so go on | |
@@ -180,6 +187,7 @@ class Perl6::ModuleLoader { | |
if $setting_name ne 'NULL' { | |
# Add path prefix and .setting suffix. | |
+pir::say("# Locating setting $setting_name"); | |
my $path := "$setting_name.setting.pbc"; | |
my @prefixes := self.search_path(); | |
for @prefixes -> $prefix { | |
@@ -189,7 +197,7 @@ class Perl6::ModuleLoader { | |
last; | |
} | |
} | |
- | |
+pir::say("# ... found setting at $path"); | |
# Unless we already did so, load the setting. | |
unless pir::defined(%settings_loaded{$path}) { | |
my $*CTXSAVE := self; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment