1 # A method to evaluate a Facter code block if puppet is loaded.
2 module Facter::Util::PuppetSettings
3 # This method is intended to provide a convenient way to evaluate a
4 # Facter code block only if Puppet is loaded. This is to account for the
5 # situation where the fact happens to be in the load path, but Puppet is
6 # not loaded for whatever reason. Perhaps the user is simply running
7 # facter without the --puppet flag and they happen to be working in a lib
8 # directory of a module.
10 Module.const_get('Puppet')