From 0bd3055d29f9ee7785a8664360b89fc015a83a4e Mon Sep 17 00:00:00 2001 From: luke Date: Thu, 21 Sep 2006 22:30:35 +0000 Subject: 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 --- lib/puppet/autoload.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/puppet/autoload.rb') 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] -- cgit