Deprecate compute_all_applicable_attributes() and get_attribute_map()
[gitmo/Mouse.git] / lib / Mouse / Meta / Module.pm
index 0eba004..30f7b8a 100755 (executable)
@@ -30,7 +30,7 @@ sub initialize {
 sub class_of{
     my($class_or_instance) = @_;
     return undef unless defined $class_or_instance;
-    return $METAS{ blessed($class_or_instance) || $class_or_instance };
+    return $METAS{ ref($class_or_instance) || $class_or_instance };
 }
 
 # Means of accessing all the metaclasses that have
@@ -63,7 +63,11 @@ sub name { $_[0]->{package} }
 
 # add_attribute is an abstract method
 
-sub get_attribute_map {        $_[0]->{attributes}          }
+sub get_attribute_map {
+    Carp::cluck('get_attribute_map() has been deprecated');
+    return $_[0]->{attributes};
+}
+
 sub has_attribute     { exists $_[0]->{attributes}->{$_[1]} }
 sub get_attribute     {        $_[0]->{attributes}->{$_[1]} }
 sub get_attribute_list{ keys %{$_[0]->{attributes}}         }