From: gfx Date: Fri, 2 Oct 2009 10:18:40 +0000 (+0900) Subject: Remove the use of get_attribute_map() X-Git-Tag: 0.37_02~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc08dff9f13ae25057d4e84ddfacb4bdf44fea67;p=gitmo%2FMouse.git Remove the use of get_attribute_map() --- diff --git a/t/000-recipes/moose_cookbook_meta_recipe3.t b/t/000-recipes/moose_cookbook_meta_recipe3.t index fe1ab24..1587270 100644 --- a/t/000-recipes/moose_cookbook_meta_recipe3.t +++ b/t/000-recipes/moose_cookbook_meta_recipe3.t @@ -42,9 +42,8 @@ $| = 1; my $dump = ''; - my %attributes = %{ $self->meta->get_attribute_map }; - for my $name ( sort keys %attributes ) { - my $attribute = $attributes{$name}; + for my $name ( $self->meta->get_attribute_list ) { + my $attribute = $self->meta->get_attribute($name); if ( $attribute->does('MyApp::Meta::Attribute::Trait::Labeled') && $attribute->has_label ) { diff --git a/t/018-multiattr-has.t b/t/018-multiattr-has.t index acd258b..8458e89 100644 --- a/t/018-multiattr-has.t +++ b/t/018-multiattr-has.t @@ -19,7 +19,7 @@ do { }; can_ok(Class => qw/a b c/); -is(keys %{ Class->meta->get_attribute_map }, 3, "three attributes created"); +is_deeply([sort Class->meta->get_attribute_list], [sort qw/a b c/], "three attributes created"); Class->new(a => 1, b => 2); is_deeply(\%trigger, { a => 1, b => 1 }, "correct triggers called");