summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/autoload.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-22 18:07:52 -0500
committerLuke Kanies <luke@madstop.com>2007-08-22 18:07:52 -0500
commitb9f529a063cabb183966da29739cd924836eb67b (patch)
treec0056176c2ff82d0fe90dfc6c97826f6d79917a6 /lib/puppet/util/autoload.rb
parent0682d7e473cfd8f2fe6bee9eae0868b846fd0d50 (diff)
parent282ec893ef895e0d386126ba70494a3b086030b9 (diff)
downloadpuppet-b9f529a063cabb183966da29739cd924836eb67b.tar.gz
puppet-b9f529a063cabb183966da29739cd924836eb67b.tar.xz
puppet-b9f529a063cabb183966da29739cd924836eb67b.zip
Merging the multi_env branch with master. There are not actually any conflicts, so this commit might only be necessary because I did not pull sufficiently often.
Diffstat (limited to 'lib/puppet/util/autoload.rb')
-rw-r--r--lib/puppet/util/autoload.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/puppet/util/autoload.rb b/lib/puppet/util/autoload.rb
index 42aa56c32..be9e14671 100644
--- a/lib/puppet/util/autoload.rb
+++ b/lib/puppet/util/autoload.rb
@@ -141,7 +141,13 @@ class Puppet::Util::Autoload
# The list of directories to search through for loadable plugins.
def searchpath
- [Puppet[:libdir], $:].flatten
+ # JJM: Search for optional lib directories in each module bundle.
+ module_lib_dirs = Puppet[:modulepath].split(":").collect do |d|
+ Dir.glob("%s/*/lib" % d).select do |f|
+ FileTest.directory?(f)
+ end
+ end.flatten
+ [module_lib_dirs, Puppet[:libdir], $:].flatten
end
end