# File lib/puppet/parser/type_loader.rb, line 122
122:   def name2files(namespaces, name)
123:     return [name.sub(/^::/, '').gsub("::", File::SEPARATOR)] if name =~ /^::/
124: 
125:     result = namespaces.inject([]) do |names_to_try, namespace|
126:       fullname = (namespace + "::#{name}").sub(/^::/, '')
127: 
128:       # Try to load the module init file if we're a qualified name
129:       names_to_try << fullname.split("::")[0] if fullname.include?("::")
130: 
131:       # Then the fully qualified name
132:       names_to_try << fullname
133:     end
134: 
135:     # Otherwise try to load the bare name on its own.  This
136:     # is appropriate if the class we're looking for is in a
137:     # module that's different from our namespace.
138:     result << name
139:     result.uniq.collect { |f| f.gsub("::", File::SEPARATOR) }
140:   end