From: Justin Hunter Date: Thu, 24 Sep 2009 23:58:20 +0000 (-0700) Subject: fix extra method X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ef79fbfb010f138a63deed80a0a29fdc31dffa70;p=dbsrgits%2FSQL-Translator-2.0-ish.git fix extra method --- diff --git a/lib/SQL/Translator/Object.pm b/lib/SQL/Translator/Object.pm index 6236cea..538395b 100644 --- a/lib/SQL/Translator/Object.pm +++ b/lib/SQL/Translator/Object.pm @@ -51,7 +51,7 @@ class SQL::Translator::Object { multi method options(ArrayRef $options) { $self->add_option($_) for @$options; $self->options } multi method options(Any $) { wantarray ? @{$self->_options} : $self->_options } - multi method extra(Str $extra) { $self->get_extra($extra); $self->extra } - multi method extra(HashRef $extra) { $self->_extra($extra); $self->extra } + multi method extra(Str $extra) { $self->get_extra($extra) } + multi method extra(HashRef $extra) { $self->add_extra($_, $extra->{$_}) for keys %$extra; $self->extra } multi method extra(Any $) { wantarray ? %{$self->_extra} : $self->_extra } }