From: Dagfinn Ilmari Mannsåker Date: Sat, 18 Jun 2016 15:35:53 +0000 (+0100) Subject: Add AuthorTests to list of required M:I Plugins X-Git-Tag: 0.07046~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=30ede608b06ea02352a52bd0bb71d5f7798998b8;hp=1fb9f5093c05c7c3ca4dac6a10f31b911289b36a;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Add AuthorTests to list of required M:I Plugins --- diff --git a/Makefile.PL b/Makefile.PL index 4d33fed..77bb41f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -84,8 +84,16 @@ See also the "Changes" file for the last few revisions. EOF if ($Module::Install::AUTHOR && ! $args->{skip_author_deps}) { - eval { require Module::Install::ReadmeFromPod } - or die "\nYou need Module::Install::ReadmeFromPod installed to run this Makefile.PL in author mode:\n\n$@\n"; + my @missing_plugins; + for my $plugin (qw(ReadmeFromPod AuthorTests)) { + eval "require Module::Install::$plugin" and next; + push @missing_plugins, "Module::Instal::$plugin"; + chomp(my $err = $@); + $missing_plugins[-1] .= " ($err)" + unless $err =~ m{^Can't locate Module/Install/$plugin.pm in \@INC}; + } + die "\nYou need to install the following modules to run this Makefile.PL in author mode:\n\n", join("\n", @missing_plugins), "\n\n" + if @missing_plugins; warn "\n*** AUTHOR MODE: some optional dependencies converted to hard requires.\n\n";