# File lib/puppet/util/autoload.rb, line 144
144:     def module_directories
145:         # We have to require this late in the process because otherwise we might have
146:         # load order issues.
147:         require 'puppet/node/environment'
148:         Puppet::Node::Environment.new.modulepath.collect do |dir|
149:             Dir.entries(dir).reject { |f| f =~ /^\./ }.collect { |f| File.join(dir, f) }
150:         end.flatten.collect { |d| [File.join(d, "plugins"), File.join(d, "lib")] }.flatten.find_all do |d|
151:             FileTest.directory?(d)
152:         end
153:     end