X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=9ec98e23c60bef0707f0a3f23018c1a005c65d62;hb=f90896ae18712675ac223834265342fbc5558b07;hp=d2cd848cc613e27e5087c74453abf903bb2a7a04;hpb=887d8da0864e028f457ce5c6abaccb2d7160698b;p=dbsrgits%2FDBIx-Class.git diff --git a/Makefile.PL b/Makefile.PL index d2cd848..9ec98e2 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,4 @@ -use inc::Module::Install 0.93; +use inc::Module::Install 0.97; use strict; use warnings; use POSIX (); @@ -12,6 +12,14 @@ use lib "$FindBin::Bin/lib"; use Config; $ENV{PERL5LIB} = join ($Config{path_sep}, @INC); +use Getopt::Long qw/:config gnu_getopt bundling_override no_ignore_case pass_through/; +my $args = { + skip_author_deps => undef, +}; +GetOptions ($args, 'skip_author_deps'); +if (@ARGV) { + warn "\nIgnoring unrecognized option(s): @ARGV\n\n"; +} ### ### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends() @@ -64,23 +72,45 @@ my $reqs = { # require extra modules for testing if we're in a checkout +my $optdep_msg; if ($Module::Install::AUTHOR) { - warn <<'EOW'; + if ($args->{skip_author_deps}) { + $optdep_msg = <<'EOW'; + +****************************************************************************** +****************************************************************************** +*** *** +*** IGNORING AUTHOR MODE: no optional test dependencies will be forced. *** +*** *** +*** If you are using this checkout with the intention of submitting a DBIC *** +*** patch, you are *STRONGLY ENCOURAGED* to install all dependencies, so *** +*** that every possible unit-test will run. *** +*** *** +****************************************************************************** +****************************************************************************** + +EOW + } + else { + $optdep_msg = <<'EOW'; + ****************************************************************************** ****************************************************************************** *** *** *** AUTHOR MODE: all optional test dependencies converted to hard requires *** +*** ( to disabled re-run Makefile.PL with --skip_author_deps ) *** *** *** ****************************************************************************** ****************************************************************************** EOW - require DBIx::Class::Optional::Dependencies; - $reqs->{test_requires} = { - %{$reqs->{test_requires}}, - map { %$_ } (values %{DBIx::Class::Optional::Dependencies->req_group_list}), - }; + require DBIx::Class::Optional::Dependencies; + $reqs->{test_requires} = { + %{$reqs->{test_requires}}, + map { %$_ } (values %{DBIx::Class::Optional::Dependencies->req_group_list}), + }; + } } # compose final req list, for alphabetical ordering @@ -104,7 +134,10 @@ for my $mod (sort keys %final_req) { $rtype->($mod, $ver); } +# output twice since the deplist is > 70 lines +warn $optdep_msg if $Module::Install::AUTHOR; auto_install(); +warn $optdep_msg if $Module::Install::AUTHOR; # re-create various autogenerated documentation bits if ($Module::Install::AUTHOR) { @@ -126,10 +159,16 @@ if ($Module::Install::AUTHOR) { # PodInherit(); } + tests_recursive (qw| t |); +# temporary(?) until I get around to fix M::I wrt xt/ +# needs Module::Install::AuthorTests +recursive_author_tests (qw/xt/); + + install_script (qw| script/dbicadmin |); @@ -157,11 +196,10 @@ create_distdir : manifest EOP - - +homepage 'http://www.dbix-class.org/'; resources 'IRC' => 'irc://irc.perl.org/#dbix-class'; resources 'license' => 'http://dev.perl.org/licenses/'; -resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class/'; +resources 'repository' => 'git://git.shadowcat.co.uk/dbsrgits/DBIx-Class.git'; resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class'; # Deprecated/internal modules need no exposure @@ -180,7 +218,7 @@ WriteAll(); # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this) -if ($Module::Install::AUTHOR) { +if ($Module::Install::AUTHOR && ! $args->{skip_author_deps} ) { # FIXME test_requires is not yet part of META my %original_build_requires = ( %$build_requires, %$test_requires );