From: Hans Dieter Pearcey Date: Thu, 25 Jun 2009 22:39:04 +0000 (-0400) Subject: fix obvious things that are broken X-Git-Tag: 0.89_02~123 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e928ab1a2a3cc6e1e56bc88bd1401396305f441;p=gitmo%2FMoose.git fix obvious things that are broken --- diff --git a/t/070_attribute_helpers/100_collection_with_roles.t b/t/070_attribute_helpers/100_collection_with_roles.t index ae7e9dc..4f121c1 100644 --- a/t/070_attribute_helpers/100_collection_with_roles.t +++ b/t/070_attribute_helpers/100_collection_with_roles.t @@ -15,12 +15,15 @@ use Moose::Role; use Moose::AttributeHelpers; has observers => ( - metaclass => 'Collection::Array', + traits => [ 'Collection::Array' ], is => 'ro', isa => 'ArrayRef[Observer]', auto_deref => 1, default => sub { [] }, - provides => { 'push' => 'add_observer', count => 'count_observers' } + handles => { + 'add_observer' => 'push', + 'count_observers' => 'count', + }, ); sub notify { @@ -48,17 +51,17 @@ use Moose::AttributeHelpers; with 'Subject'; has count => ( - metaclass => 'Counter', + trait => [ 'Counter' ], is => 'ro', isa => 'Int', default => 0, - provides => { - inc => 'inc_counter', - dec => 'dec_counter', - } + handles => { + inc_counter => 'inc', + dec_counter => 'dec', + }, ); -after 'inc_counter','dec_counter' => sub { +after 'inc_counter', 'dec_counter' => sub { my ($self) = @_; $self->notify(); }; @@ -120,4 +123,4 @@ is($count->count, -1, 'Negative numbers'); $count->inc_counter; -is($count->count, 0, 'Back to zero'); \ No newline at end of file +is($count->count, 0, 'Back to zero');