# File lib/puppet/type.rb, line 760
760:   def self.[]=(name,object)
761:     raise "Global resource storage is deprecated"
762:     newobj = nil
763:     if object.is_a?(Puppet::Type)
764:       newobj = object
765:     else
766:       raise Puppet::DevError, "must pass a Puppet::Type object"
767:     end
768: 
769:     if exobj = @objects[name] and self.isomorphic?
770:       msg = "Object '#{newobj.class.name}[#{name}]' already exists"
771: 
772:       msg += ("in file #{object.file} at line #{object.line}") if exobj.file and exobj.line
773:       msg += ("and cannot be redefined in file #{object.file} at line #{object.line}") if object.file and object.line
774:       error = Puppet::Error.new(msg)
775:       raise error
776:     else
777:       #Puppet.info("adding %s of type %s to class list" %
778:       #    [name,object.class])
779:       @objects[name] = newobj
780:     end
781:   end