# File lib/puppet/resource/type_collection.rb, line 99
 99:   def find(namespaces, name, type)
100:     #Array("") == [] for some reason
101:     namespaces = [namespaces] unless namespaces.is_a?(Array)
102: 
103:     if name =~ /^::/
104:       return send(type, name.sub(/^::/, ''))
105:     end
106: 
107:     namespaces.each do |namespace|
108:       ary = namespace.split("::")
109: 
110:       while ary.length > 0
111:         tmp_namespace = ary.join("::")
112:         if r = find_partially_qualified(tmp_namespace, name, type)
113:           return r
114:         end
115: 
116:         # Delete the second to last object, which reduces our namespace by one.
117:         ary.pop
118:       end
119: 
120:       if result = send(type, name)
121:         return result
122:       end
123:     end
124:     nil
125:   end