From: Matt S Trout Date: Sat, 24 Aug 2019 04:13:04 +0000 (+0000) Subject: format works X-Git-Tag: v2.000000~3^2~162 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e2e734f1b107297c7b9876c88ebeaffa70ce69f;p=dbsrgits%2FSQL-Abstract.git format works --- diff --git a/lib/SQL/Abstract/Formatter.pm b/lib/SQL/Abstract/Formatter.pm index 829b110..1011de8 100644 --- a/lib/SQL/Abstract/Formatter.pm +++ b/lib/SQL/Abstract/Formatter.pm @@ -17,7 +17,7 @@ sub format { my $sql = $self->_join($join, @parts); return $sql unless length($sql) > $self->max_width; local $self->{max_width} = $self->{max_width} - length($self->indent_by); - return join("\n", map $self->format(@$_), @parts); + return join("\n", map ref() ? $self->format(@$_) : $_, @parts); } 1;