From: Yuval Kogman Date: Mon, 27 Mar 2006 22:21:27 +0000 (+0000) Subject: split( ";\n", @statements" ) returns crack X-Git-Tag: v0.06001~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e4fe9ba3300db1e9259aee512ec6d4e84b3aca13;p=dbsrgits%2FDBIx-Class.git split( ";\n", @statements" ) returns crack --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index af628e2..35a165a 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -637,10 +637,11 @@ sub deployment_statements { sub deploy { my ($self, $schema, $type, $sqltargs) = @_; - my @statements = $self->deployment_statements($schema, $type, $sqltargs); - foreach(split(";\n", @statements)) { - $self->debugfh->print("$_\n") if $self->debug; - $self->dbh->do($_) or warn "SQL was:\n $_"; + foreach my $statement ( $self->deployment_statements($schema, $type, $sqltargs) ) { + for ( split(";\n", $statement)) { + $self->debugfh->print("$_\n") if $self->debug; + $self->dbh->do($_) or warn "SQL was:\n $_"; + } } }