From: Ken Youens-Clark Date: Mon, 9 Jun 2003 02:10:59 +0000 (+0000) Subject: Small changes to comments and size methods. X-Git-Tag: v0.02~54 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aadf40421bcf6107c0b00205254b06fe84b406ef;p=dbsrgits%2FSQL-Translator.git Small changes to comments and size methods. --- diff --git a/lib/SQL/Translator/Schema/Field.pm b/lib/SQL/Translator/Schema/Field.pm index 4ed5fcb..b7b2529 100644 --- a/lib/SQL/Translator/Schema/Field.pm +++ b/lib/SQL/Translator/Schema/Field.pm @@ -1,7 +1,7 @@ package SQL::Translator::Schema::Field; # ---------------------------------------------------------------------- -# $Id: Field.pm,v 1.7 2003-06-06 22:35:44 kycl4rk Exp $ +# $Id: Field.pm,v 1.8 2003-06-09 02:10:59 kycl4rk Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark # @@ -99,7 +99,11 @@ all the comments joined on newlines. =cut my $self = shift; - push @{ $self->{'comments'} }, @_ if @_; + + for my $arg ( @_ ) { + $arg = $arg->[0] if ref $arg; + push @{ $self->{'comments'} }, $arg; + } return wantarray ? @{ $self->{'comments'} || [] } @@ -442,7 +446,7 @@ numbers and returns a string. } return wantarray - ? @{ $self->{'size'} } + ? @{ $self->{'size'} || [0] } : join( ',', @{ $self->{'size'} || [0] } ) ; }