From: Dave Rolsky Date: Fri, 17 Jun 2011 15:41:54 +0000 (-0500) Subject: Make our Makefile.PL more friendly by explicitly checking for modules that it needs X-Git-Tag: 2.0009~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b0775a727a17ebb005da9bfaf6b353c6b0838b8;p=gitmo%2FMoose.git Make our Makefile.PL more friendly by explicitly checking for modules that it needs --- diff --git a/Makefile.PL b/Makefile.PL index 36093c1..f0756cd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,7 +1,22 @@ use strict; use warnings; -use ExtUtils::MakeMaker::Dist::Zilla::Develop; +BEGIN { + eval { require ExtUtils::MakeMaker::Dist::Zilla::Develop }; + if ($@) { + warn + "You need to install ExtUtils::MakeMaker::Dist::Zilla::Develop to run this Makefile.PL\n"; + exit 1; + } + + eval { require Test::Inline }; + if ($@) { + warn "You need to install Test::Inline to run this Makefile.PL\n"; + exit 1; + } + + ExtUtils::MakeMaker::Dist::Zilla::Develop->import(); +} use lib 'inc';