X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=095fb0be9eb5eb03ce371a43f6b77fa9401f9ea0;hb=5939bf085ba9426e336f300b5b25e17078ba7e65;hp=dae8d9d5efb65fe87fa8056a038273111b41dd16;hpb=494e020541e534ac7a097872eeeb344a0b13ec5a;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/Makefile.PL b/Makefile.PL index dae8d9d..095fb0b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,6 +2,7 @@ use warnings; use strict; use 5.008001; +BEGIN { unshift @INC, '.' unless $INC[-1] eq '.'; } use inc::Module::Install 1.00; use Getopt::Long(); @@ -43,6 +44,7 @@ requires 'Class::Accessor::Grouped' => '0.10008'; requires 'Class::C3::Componentised' => '1.0008'; requires 'Class::Inspector' => '1.27'; requires 'Class::Unload' => '0.07'; +requires 'curry' => '1.000000', requires 'Data::Dump' => '1.06'; requires 'DBIx::Class' => '0.08127'; requires 'Hash::Merge' => '0.12'; @@ -84,8 +86,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::Install::$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"; @@ -104,6 +114,14 @@ if ($Module::Install::AUTHOR && ! $args->{skip_author_deps}) { author_tests( 'xt' ); readme_from( 'lib/DBIx/Class/Schema/Loader.pm' ); realclean_files( qw[README MANIFEST lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod] ); + postamble <