From: Dave Rolsky Date: Sat, 13 Sep 2008 03:23:03 +0000 (+0000) Subject: I kept wondering why I "mistyped" this method name. Oh, it's spelled X-Git-Tag: 0.66~3^2~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=abfebb5208f2548ec481bd2db36d1505f77fb180;p=gitmo%2FClass-MOP.git I kept wondering why I "mistyped" this method name. Oh, it's spelled wrong. Sigh. --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index bc7c269..3908891 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -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 once all the bootstrapping is done. This method is used internally by C and should never be called from outside of that method really. -=item B +=item B This method is called as the very last thing in the C method. This will check that the diff --git a/t/010_self_introspection.t b/t/010_self_introspection.t index 00006be..48e6ab6 100644 --- a/t/010_self_introspection.t +++ b/t/010_self_introspection.t @@ -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 diff --git a/t/041_metaclass_incompatability.t b/t/041_metaclass_incompatibility.t similarity index 100% rename from t/041_metaclass_incompatability.t rename to t/041_metaclass_incompatibility.t diff --git a/t/071_immutable_w_custom_metaclass.t b/t/071_immutable_w_custom_metaclass.t index ad7638c..b93df90 100644 --- a/t/071_immutable_w_custom_metaclass.t +++ b/t/071_immutable_w_custom_metaclass.t @@ -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'; } { diff --git a/t/pod_coverage.t b/t/pod_coverage.t index 7569358..ad3ff87 100644 --- a/t/pod_coverage.t +++ b/t/pod_coverage.t @@ -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/ ] } );