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.0102~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dc381d64648145024d11aa7567cc22d00f795c3b;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';