# File lib/puppet/type.rb, line 877
877:     def self.[]=(name,object)
878:         raise "Global resource storage is deprecated"
879:         newobj = nil
880:         if object.is_a?(Puppet::Type)
881:             newobj = object
882:         else
883:             raise Puppet::DevError, "must pass a Puppet::Type object"
884:         end
885: 
886:         if exobj = @objects[name] and self.isomorphic?
887:             msg = "Object '%s[%s]' already exists" %
888:                 [newobj.class.name, name]
889: 
890:             if exobj.file and exobj.line
891:                 msg += ("in file %s at line %s" %
892:                     [object.file, object.line])
893:             end
894:             if object.file and object.line
895:                 msg += ("and cannot be redefined in file %s at line %s" %
896:                     [object.file, object.line])
897:             end
898:             error = Puppet::Error.new(msg)
899:             raise error
900:         else
901:             #Puppet.info("adding %s of type %s to class list" %
902:             #    [name,object.class])
903:             @objects[name] = newobj
904:         end
905:     end