I kept wondering why I "mistyped" this method name. Oh, it's spelled
Dave Rolsky [Sat, 13 Sep 2008 03:23:03 +0000 (03:23 +0000)]
wrong. Sigh.

lib/Class/MOP/Class.pm
t/010_self_introspection.t
t/041_metaclass_incompatibility.t [moved from t/041_metaclass_incompatability.t with 100% similarity]
t/071_immutable_w_custom_metaclass.t
t/pod_coverage.t

index bc7c269..3908891 100644 (file)
@@ -85,7 +85,7 @@ sub construct_class_instance {
     }
 
     # and check the metaclass compatibility
-    $meta->check_metaclass_compatability();  
+    $meta->check_metaclass_compatibility();  
 
     Class::MOP::store_metaclass_by_name($package_name, $meta);
 
@@ -140,7 +140,7 @@ sub update_package_cache_flag {
     $self->{'_package_cache_flag'} = Class::MOP::check_package_cache_flag($self->name);    
 }
 
-sub check_metaclass_compatability {
+sub check_metaclass_compatibility {
     my $self = shift;
 
     # this is always okay ...
@@ -167,7 +167,7 @@ sub check_metaclass_compatability {
                        $class_name . "->meta => (" . ($meta_type)     . ")";
         # NOTE:
         # we also need to check that instance metaclasses
-        # are compatabile in the same the class.
+        # are compatibile in the same the class.
         ($self->instance_metaclass->isa($meta->instance_metaclass))
             || confess $self->name . "->meta->instance_metaclass => (" . ($self->instance_metaclass) . ")" .
                        " is not compatible with the " .
@@ -175,6 +175,12 @@ sub check_metaclass_compatability {
     }
 }
 
+# backwards compat for stevan's inability to spell ;)
+sub check_metaclass_compatability {
+    my $self = shift;
+    $self->check_metaclass_compatibility(@_);
+}
+
 ## ANON classes
 
 {
@@ -492,7 +498,8 @@ sub superclasses {
         # be sure that the superclass is
         # not potentially creating an issues
         # we don't know about
-        $self->check_metaclass_compatability();
+
+        $self->check_metaclass_compatibility();
         $self->update_meta_instance_dependencies();
     }
     @{$self->get_package_symbol($var_spec)};
@@ -1235,7 +1242,7 @@ to use C<construct_instance> once all the bootstrapping is done. This
 method is used internally by C<initialize> and should never be called
 from outside of that method really.
 
-=item B<check_metaclass_compatability>
+=item B<check_metaclass_compatibility>
 
 This method is called as the very last thing in the
 C<construct_class_instance> method. This will check that the
index 00006be..48e6ab6 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 234;
+use Test::More tests => 236;
 use Test::Exception;
 
 BEGIN {
@@ -63,6 +63,7 @@ my @class_mop_class_methods = qw(
     new_object clone_object
     construct_instance construct_class_instance clone_instance
     rebless_instance
+    check_metaclass_compatibility
     check_metaclass_compatability
 
     add_meta_instance_dependencies remove_meta_instance_depdendencies update_meta_instance_dependencies
index ad7638c..b93df90 100644 (file)
@@ -45,7 +45,7 @@ use lib catdir($FindBin::Bin, 'lib');
 
     ::lives_ok {
         Baz->meta->superclasses('Bar');
-    } '... we survive the metaclass incompatability test';
+    } '... we survive the metaclass incompatibility test';
 }
 
 {
index 7569358..ad3ff87 100644 (file)
@@ -8,4 +8,4 @@ use Test::More;
 eval "use Test::Pod::Coverage 1.04";
 plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
 
-all_pod_coverage_ok();
+all_pod_coverage_ok( { trustme => [ qr/compatability/ ] } );