lib/puppet/resource/type_collection.rb
# Resolve namespaces and find the given object.  Autoload it if
# necessary.
Resolve namespaces and find the given object.  Autoload it if
necessary.
Resolve namespaces and find the given object . Autoload it if necessary .
def find_or_load(name, type)
    fqname = (name[0,2] == COLON_COLON ? name[2..-1] : name)
    result = send(type, fqname)
    unless result
      if @notfound[ fqname ] && Puppet[ :ignoremissingtypes ]
        if Puppet[:debug]
          debug_once "Not attempting to load #{type} #{fqname} as this object was missing during a prior compilation"
        end
      else
        result = loader.try_load_fqname(type, fqname)
        @notfound[ fqname ] = result.nil?
      end
    end
    result
  end
def find_or_load ( name , type ) fqname = ( name [ 0 , 2 ] == COLON_COLON ? name [ 2 .. - 1 ] : name ) result = send ( type , fqname ) unless result if @notfound [ fqname ] && Puppet [ :ignoremissingtypes ] if Puppet [ :debug ] debug_once "Not attempting to load #{type} #{fqname} as this object was missing during a prior compilation" end else result = loader . try_load_fqname ( type , fqname ) @notfound [ fqname ] = result . nil? end end result end
Resolve namespaces and find the given object.
Resolve namespaces and find the given object .
# Name is always absolute, but may start with :: which must be removed # do not try to autoload if we already tried and it wasn't conclusive # as this is a time consuming operation. Warn the user. # Check first if debugging is on since the call to debug_once is expensive
name
<not_specific>
type
<not_specific>