From: Arthur Axel 'fREW' Schmidt Date: Sat, 8 May 2010 18:04:39 +0000 (-0500) Subject: check for failed compile X-Git-Tag: v0.001000_07~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=42bb7d9eabc3bab810be612303309049bc88e0ca;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git check for failed compile --- diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm index 996a58b..e64dd2c 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm @@ -224,7 +224,9 @@ sub preinstall_scripts { no warnings 'redefine'; eval "package $package;\n\n$filedata"; use warnings; - if (my $fn = $package->can('run')) { + if ($@) { + carp "$filename failed to compile: $@"; + } elsif (my $fn = $package->can('run')) { $fn->() } else { carp "$filename should define a run sub but it didn't!";