summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-02-02 08:56:40 +0100
committerYorhel <git@yorhel.nl>2018-02-02 08:56:40 +0100
commit4d3c301576d41149b820821a790670abc4aba374 (patch)
tree3cd00b86eaddbfef06e16d442dff1c87e22fd689
parent284c8bb2fd1b98056ae1519cd7e6a8caa656089f (diff)
Actually honor the import_modules setting
-rw-r--r--lib/TUWF.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/TUWF.pm b/lib/TUWF.pm
index 1e8fb0a..4d95135 100644
--- a/lib/TUWF.pm
+++ b/lib/TUWF.pm
@@ -195,7 +195,7 @@ sub hook ($&) {
# Load modules
sub load {
- $OBJ->_load_module($_, $OBJ->{import_modules}) for (@_);
+ $OBJ->_load_module($_, $OBJ->{_TUWF}{import_modules}) for (@_);
}
# Load modules, recursively
@@ -205,7 +205,7 @@ sub load_recursive {
$rec = sub {
my($d, $f, $m) = @_;
for my $s (glob "\"$d/$f/*\"") {
- $OBJ->_load_module("${m}::$1", $OBJ->{import_modules}) if -f $s && $s =~ /([^\/]+)\.pm$/;
+ $OBJ->_load_module("${m}::$1", $OBJ->{_TUWF}{import_modules}) if -f $s && $s =~ /([^\/]+)\.pm$/;
$rec->($d, "$f/$1", "${m}::$1") if -d $s && $s =~ /([^\/]+)$/;
}
};
@@ -213,7 +213,7 @@ sub load_recursive {
(my $f = $m) =~ s/::/\//g;
my $d = (grep +(-d "$_/$f" or -s "$_/$f.pm"), @INC)[0];
croak "No module or submodules of '$m' found" if !$d;
- $OBJ->_load_module($m, $OBJ->{import_modules}) if -s "$d/$f.pm";
+ $OBJ->_load_module($m, $OBJ->{_TUWF}{import_modules}) if -s "$d/$f.pm";
$rec->($d, $f, $m) if -d "$d/$f";
}
}