From: Arthur Axel 'fREW' Schmidt Date: Sun, 17 Feb 2013 15:01:01 +0000 (-0600) Subject: Fix errors caused by serialization of $dbh X-Git-Tag: v0.002205~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-DeploymentHandler.git;a=commitdiff_plain;h=dc223c8897fd237cffda64a85d5e15be01f8bcbd Fix errors caused by serialization of $dbh See discussion here: https://github.com/dbsrgits/dbix-class/commit/b3f891879 --- diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm index 9f9b971..9efa8d4 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm @@ -703,14 +703,13 @@ sub prepare_protoschema { # we do this because the code that uses this sets parser args, # so we just need to merge in the package - $sqltargs->{parser_args}{package} = $self->schema; my $sqlt = SQL::Translator->new({ parser => 'SQL::Translator::Parser::DBIx::Class', producer => 'SQL::Translator::Producer::YAML', %{ $sqltargs }, }); - my $yml = $sqlt->translate; + my $yml = $sqlt->translate(data => $self->schema); croak("Failed to translate to YAML: " . $sqlt->error) unless $yml;