From: Peter Rabbitson Date: Wed, 1 Sep 2010 06:23:21 +0000 (+0200) Subject: Fixup Makefile.PL to not croak on pristine dev-systems X-Git-Tag: 0.07002~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a72f15dc5d9e1ecc025a1510d9343b5aaa2cf36;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Fixup Makefile.PL to not croak on pristine dev-systems --- diff --git a/Makefile.PL b/Makefile.PL index 1ed32e9..10c2834 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,12 +1,13 @@ -use inc::Module::Install 0.91; - -require Module::Install::ReadmeFromPod; +use warnings; +use strict; use 5.008001; +use inc::Module::Install 1.00; use FindBin; use lib "$FindBin::Bin/lib"; +perl_version '5.008001'; name 'DBIx-Class-Schema-Loader'; all_from 'lib/DBIx/Class/Schema/Loader.pm'; @@ -42,22 +43,25 @@ requires 'Exporter' => '5.63'; requires 'Try::Tiny' => 0; if ($Module::Install::AUTHOR) { - warn "\n*** AUTHOR MODE: some optional dependencies converted to hard dependencies.\n\n"; + eval { require Module::Install::ReadmeFromPod } + or die "\nYou need Module::Install::ReadmeFromPod installed to run this Makefile.PL in author mode:\n\n$@\n"; + + warn "\n*** AUTHOR MODE: some optional dependencies converted to hard requires.\n\n"; require DBIx::Class::Schema::Loader::Optional::Dependencies; test_requires map %$_, values %{ DBIx::Class::Schema::Loader::Optional::Dependencies->req_group_list }; DBIx::Class::Schema::Loader::Optional::Dependencies->_gen_pod; + + readme_from( 'lib/DBIx/Class/Schema/Loader.pm' ); + realclean_files( qw[README MANIFEST lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod] ); } tests_recursive; install_script 'script/dbicdump'; -readme_from 'lib/DBIx/Class/Schema/Loader.pm'; -realclean_files qw[README MANIFEST lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod]; - resources 'IRC' => 'irc://irc.perl.org/#dbix-class'; resources 'license' => 'http://dev.perl.org/licenses/'; resources 'repository' => 'git://git.shadowcat.co.uk/dbsrgits/DBIx-Class-Schema-Loader.git';