From: Peter Rabbitson Date: Mon, 16 Apr 2012 04:42:01 +0000 (+0200) Subject: Add strictures to the Makefile.PL inc-snippets X-Git-Tag: v0.08197~30 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8baa212285bdd1bb5e3a389a9c5fd34ffddfb9df;p=dbsrgits%2FDBIx-Class.git Add strictures to the Makefile.PL inc-snippets --- diff --git a/Makefile.PL b/Makefile.PL index d4d11e3..77abec6 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -148,9 +148,13 @@ if ($Module::Install::AUTHOR and ! $ENV{MAKELEVEL}) { # string-eval, not do(), because we need to provide the # $reqs and $*_requires lexicals to the included file # (some includes *do* modify $reqs above) - for (sort glob ( File::Spec->catfile('maint', 'Makefile.PL.inc', '*') ) ) { - eval scalar do { local (@ARGV, $/) = $_; <> } - or die ($@ || $!); + for my $inc (sort glob ( File::Spec->catfile('maint', 'Makefile.PL.inc', '*') ) ) { + my $src = do { local (@ARGV, $/) = $inc; <> } or die $!; + eval "use warnings; use strict; $src" or die sprintf + "Failed execution of %s: %s\n", + $inc, + ($@ || $! || 'Unknown error'), + ; } } else {