From: Justin Hunter Date: Tue, 29 Sep 2009 23:49:34 +0000 (-0700) Subject: remove auto-deref and use the Native::Trait handles X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=98cff1fd9462e65817abcc3952b0ae848ada572c;p=dbsrgits%2FSQL-Translator-2.0-ish.git remove auto-deref and use the Native::Trait handles --- diff --git a/lib/SQL/Translator/Object.pm b/lib/SQL/Translator/Object.pm index 538395b..2b4d2b5 100644 --- a/lib/SQL/Translator/Object.pm +++ b/lib/SQL/Translator/Object.pm @@ -6,26 +6,24 @@ class SQL::Translator::Object { has '_comments' => ( traits => ['Array'], - is => 'rw', isa => ArrayRef, handles => { + _comments => 'elements', add_comment => 'push', remove_last_comment => 'pop', }, default => sub { [] }, - auto_deref => 1, ); has '_options' => ( traits => ['Array'], - is => 'rw', isa => ArrayRef, handles => { + _options => 'elements', add_option => 'push', remove_last_option => 'pop', }, default => sub { [] }, - auto_deref => 1, ); has '_extra' => ( @@ -40,7 +38,6 @@ class SQL::Translator::Object { add_extra => 'set', }, default => sub { {} }, - auto_deref => 1, ); multi method comments(Str $comment) { $self->add_comment($comment); $self->comments }