summaryrefslogtreecommitdiffstats
path: root/lib/puppet/autoload.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-21 22:30:35 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-21 22:30:35 +0000
commit0bd3055d29f9ee7785a8664360b89fc015a83a4e (patch)
tree648e99da321985cced163022ce7c3485f7b31cfd /lib/puppet/autoload.rb
parenteecc7cc99835b70867197991efff3c5103185326 (diff)
downloadpuppet-0bd3055d29f9ee7785a8664360b89fc015a83a4e.tar.gz
puppet-0bd3055d29f9ee7785a8664360b89fc015a83a4e.tar.xz
puppet-0bd3055d29f9ee7785a8664360b89fc015a83a4e.zip
Switching Autoload#loadall from using "load" to using "require", so it will not reload already-loaded files. Also updating the checksum docs a bit.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1657 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/autoload.rb')
-rw-r--r--lib/puppet/autoload.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/autoload.rb b/lib/puppet/autoload.rb
index 7e880b922..2604b3c91 100644
--- a/lib/puppet/autoload.rb
+++ b/lib/puppet/autoload.rb
@@ -76,8 +76,10 @@ class Puppet::Autoload
# aren't used.
name = File.basename(file).sub(".rb", '').intern
next if @loaded.include? name
+ next if $".include?(File.join(@path, name.to_s + ".rb"))
+ filepath = File.join(@path, name.to_s + ".rb")
begin
- Kernel.load file, @wrap
+ Kernel.require filepath
@loaded[name] = true
rescue => detail
if Puppet[:trace]