Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created August 7, 2011 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/1130351 to your computer and use it in GitHub Desktop.
Save jnthn/1130351 to your computer and use it in GitHub Desktop.
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