Method: Puppet::Util::Autoload.load_file
- Defined in:
- lib/puppet/util/autoload.rb
.load_file(name, env) ⇒ Object
Load a single plugin by name. We use ‘load’ here so we can reload a given plugin.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/puppet/util/autoload.rb', line 63 def load_file(name, env) file = get_file(name.to_s, env) return false unless file begin mark_loaded(name, file) Kernel.load file return true rescue SystemExit,NoMemoryError raise rescue Exception => detail = _("Could not autoload %{name}: %{detail}") % { name: name, detail: detail } Puppet.log_exception(detail, ) raise Puppet::Error, , detail.backtrace end end |