From: Justin Hunter Date: Thu, 3 Sep 2009 20:00:14 +0000 (-0700) Subject: fix options and comments methods X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b3cafe33d88446bade2be146b6d999c7a2a143a3;p=dbsrgits%2FSQL-Translator-2.0-ish.git fix options and comments methods --- diff --git a/lib/SQL/Translator/Object.pm b/lib/SQL/Translator/Object.pm index 7302766..b593f02 100644 --- a/lib/SQL/Translator/Object.pm +++ b/lib/SQL/Translator/Object.pm @@ -44,11 +44,11 @@ class SQL::Translator::Object { ); multi method comments(Str $comment) { $self->add_comment($comment) } - multi method comments(ArrayRef $comment) { $self->add_comment($comment) } + multi method comments(ArrayRef $comments) { $self->add_comment($_) for @$comments } multi method comments(Any $) { wantarray ? @{$self->_comments} : join "\n", $self->_comments } multi method options(Str $option) { $self->add_option($option) } - multi method options(ArrayRef $option) { $self->add_option($option) if scalar @$option } + multi method options(ArrayRef $options) { $self->add_option($_) for @$options } multi method options(Any $) { wantarray ? @{$self->_options} : $self->_options } multi method extra(Str $extra) { $self->get_extra($extra) }