make check_metaclass_compatibility private
Dave Rolsky [Mon, 16 Mar 2009 16:07:10 +0000 (11:07 -0500)]
lib/Class/MOP/Class.pm
t/010_self_introspection.t

index c4b3889..743749b 100644 (file)
@@ -91,7 +91,7 @@ sub _construct_class_instance {
     }
 
     # and check the metaclass compatibility
-    $meta->check_metaclass_compatibility();  
+    $meta->_check_metaclass_compatibility();  
 
     Class::MOP::store_metaclass_by_name($package_name, $meta);
 
@@ -153,7 +153,14 @@ sub update_package_cache_flag {
     $self->{'_package_cache_flag'} = Class::MOP::check_package_cache_flag($self->name);    
 }
 
+
 sub check_metaclass_compatibility {
+    warn 'The check_metaclass_compatibility method has been made private.'
+        . " The public version is deprecated and will be removed in a future release.\n";
+    goto &_check_metaclass_compatibility;
+}
+
+sub _check_metaclass_compatibility {
     my $self = shift;
 
     # this is always okay ...
@@ -472,7 +479,7 @@ sub superclasses {
         # not potentially creating an issues
         # we don't know about
 
-        $self->check_metaclass_compatibility();
+        $self->_check_metaclass_compatibility();
         $self->update_meta_instance_dependencies();
     }
     @{$self->get_package_symbol($var_spec)};
index 3d21424..19f1786 100644 (file)
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 246;
+use Test::More tests => 248;
 use Test::Exception;
 
 use Class::MOP;
@@ -61,7 +61,7 @@ my @class_mop_class_methods = qw(
     construct_class_instance _construct_class_instance
     clone_instance
     rebless_instance
-    check_metaclass_compatibility
+    check_metaclass_compatibility _check_metaclass_compatibility
 
     add_meta_instance_dependencies remove_meta_instance_dependencies update_meta_instance_dependencies
     add_dependent_meta_instance remove_dependent_meta_instance