From: Dave Rolsky Date: Mon, 16 Mar 2009 16:07:10 +0000 (-0500) Subject: make check_metaclass_compatibility private X-Git-Tag: 0.80_01~52 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=11a8a2c1386357b58e7066a191856913407b2ddd;p=gitmo%2FClass-MOP.git make check_metaclass_compatibility private --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index c4b3889..743749b 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -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)}; diff --git a/t/010_self_introspection.t b/t/010_self_introspection.t index 3d21424..19f1786 100644 --- a/t/010_self_introspection.t +++ b/t/010_self_introspection.t @@ -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