From: Peter Rabbitson Date: Wed, 8 Sep 2010 07:20:51 +0000 (+0200) Subject: Add --skip_author_deps Makefile switch akin to DBIC X-Git-Tag: 0.07002~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=509e782159f621fd6a048702a5e1fd592ce9a7bf;hp=fe272a76054423403babde2c1a1ff74c6597ddd1;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Add --skip_author_deps Makefile switch akin to DBIC --- diff --git a/Makefile.PL b/Makefile.PL index 35cdebd..157d334 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,6 +4,19 @@ use strict; use 5.008001; use inc::Module::Install 1.00; +use Getopt::Long(); + +my $getopt = Getopt::Long::Parser->new( + config => [qw/gnu_getopt bundling_override no_ignore_case pass_through/] +); +my $args = { + skip_author_deps => undef, +}; +$getopt->getoptions($args, 'skip_author_deps'); +if (@ARGV) { + warn "\nIgnoring unrecognized option(s): @ARGV\n\n"; +} + use FindBin; use lib "$FindBin::Bin/lib"; @@ -42,7 +55,7 @@ requires 'List::MoreUtils' => 0; requires 'Exporter' => '5.63'; requires 'Try::Tiny' => 0; -if ($Module::Install::AUTHOR) { +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";