From: Dave Rolsky Date: Thu, 26 Mar 2009 21:33:35 +0000 (-0500) Subject: Merge branch 'master' into renames-and-deprecations X-Git-Tag: 0.80_01~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=da1bebb6a46a770cee8fe206b15998ba8db84e51;p=gitmo%2FClass-MOP.git Merge branch 'master' into renames-and-deprecations Conflicts: t/010_self_introspection.t t/073_make_mutable.t --- da1bebb6a46a770cee8fe206b15998ba8db84e51 diff --cc t/010_self_introspection.t index 9b63ea6,b9b7e8b..6fc43ec --- a/t/010_self_introspection.t +++ b/t/010_self_introspection.t @@@ -1,7 -1,7 +1,7 @@@ use strict; use warnings; - use Test::More tests => 254; -use Test::More tests => 250; ++use Test::More tests => 260; use Test::Exception; use Class::MOP; @@@ -57,14 -55,11 +57,14 @@@ my @class_mop_class_methods = qw create_anon_class is_anon_class - instance_metaclass get_meta_instance create_meta_instance + instance_metaclass get_meta_instance + create_meta_instance _create_meta_instance new_object clone_object - construct_instance construct_class_instance clone_instance + construct_instance + construct_class_instance _construct_class_instance + clone_instance _clone_instance - rebless_instance + rebless_instance rebless_instance_away - 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 diff --cc t/073_make_mutable.t index 81143c9,1ad0c96..ae6210f --- a/t/073_make_mutable.t +++ b/t/073_make_mutable.t @@@ -123,9 -135,10 +126,10 @@@ use Class::MOP ok(Baz->meta->is_immutable, 'Superclass is immutable'); my $meta = Baz->meta->create_anon_class(superclasses => ['Baz']); - my @orig_keys = sort grep { !/^_/ } keys %$meta; + my %orig_keys = map { $_ => 1 } grep { !/^_/ } keys %$meta; + $orig_keys{immutable_transformer} = 1; - my @orig_meths = sort { $a->{name} cmp $b->{name} } - $meta->compute_all_applicable_methods; + my @orig_meths = sort { $a->name cmp $b->name } + $meta->get_all_methods; ok($meta->is_anon_class, 'We have an anon metaclass'); ok($meta->is_mutable, '... our anon class is mutable'); ok(!$meta->is_immutable, '... our anon class is not immutable'); @@@ -147,11 -160,11 +151,11 @@@ ok($meta->is_anon_class, '... still marked as an anon class'); my $instance = $meta->new_object; - my @new_keys = sort grep { !/^_/ } keys %$meta; + my %new_keys = map { $_ => 1 } grep { !/^_/ } keys %$meta; - my @new_meths = sort { $a->{name} cmp $b->{name} } - $meta->compute_all_applicable_methods; + my @new_meths = sort { $a->name cmp $b->name } + $meta->get_all_methods; - is_deeply(\@orig_keys, \@new_keys, '... no straneous hashkeys'); + is_deeply(\%orig_keys, \%new_keys, '... no extraneous hashkeys'); - is_deeply(\@orig_meths, \@new_meths, '... no extraneous methods'); + is_deeply(\@orig_meths, \@new_meths, '... no straneous methods'); isa_ok($meta, 'Class::MOP::Class', '... Anon class isa Class::MOP::Class');