check for failed compile
Arthur Axel 'fREW' Schmidt [Sat, 8 May 2010 18:04:39 +0000 (13:04 -0500)]
lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm

index 996a58b..e64dd2c 100644 (file)
@@ -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!";