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_09~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-DeploymentHandler.git;a=commitdiff_plain;h=3fa64c7940605fb3d8dd8cd26a248eed2adbd0fb 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!";