From: Johannes Plunien Date: Sat, 1 Nov 2008 20:39:56 +0000 (+0000) Subject: triggers may NOT end with a semicolon X-Git-Tag: v0.11008~282 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f92d79aad4f104af6eeb16d0e2660574b633fdf2;p=dbsrgits%2FSQL-Translator.git triggers may NOT end with a semicolon --- diff --git a/lib/SQL/Translator/Producer/Oracle.pm b/lib/SQL/Translator/Producer/Oracle.pm index c3707a7..63e55ec 100644 --- a/lib/SQL/Translator/Producer/Oracle.pm +++ b/lib/SQL/Translator/Producer/Oracle.pm @@ -216,7 +216,15 @@ sub produce { push @view_defs, create_view($view); } - return wantarray ? (defined $create ? $create : (), @table_defs, @view_defs, @fk_defs, @trigger_defs, @index_defs, @constraint_defs) : $create . join ('', map { $_ ? "$_;\n\n" : () } @table_defs, @view_defs, @fk_defs, @trigger_defs, @index_defs, @constraint_defs); + if (wantarray) { + return defined $create ? $create : (), @table_defs, @view_defs, @fk_defs, @trigger_defs, @index_defs, @constraint_defs; + } + else { + $create .= join ('', map { $_ ? "$_;\n\n" : () } @table_defs, @view_defs, @fk_defs, @index_defs, @constraint_defs); + # triggers may NOT end with a semicolon + $create .= join "\n\n", @trigger_defs; + return $create; + } } sub create_table {