remove stale link and doc readonly pool queries
[dbsrgits/DBIx-Class.git] / Makefile.PL
CommitLineData
fe650234 1use strict;
2use warnings;
3
55087b99 4use 5.008001;
fc4b0448 5use inc::Module::Install 1.00;
ce4c07df 6
d1dc7a98 7##
8## DO NOT USE THIS HACK IN YOUR DISTS!!! (it makes #toolchain sad)
9##
fc4b0448 10# get cpanX --installdeps . to behave in a checkout (most users do not expect
11# the deps for a full test suite run, and if they do - there's MI::AutoInstall
12# for that)
13BEGIN {
14 $Module::Install::AUTHOR = 0 if (grep { $ENV{"PERL5_${_}_IS_RUNNING"} } (qw/CPANM CPANPLUS CPAN/) );
15}
4b5544ad 16
ce4c07df 17name 'DBIx-Class';
b50d0dd3 18perl_version '5.008001';
8e0f16f1 19all_from 'lib/DBIx/Class.pm';
ce4c07df 20
fc4b0448 21tests_recursive (qw|
22 t
23|);
8057ed01 24
fc4b0448 25install_script (qw|
26 script/dbicadmin
27|);
90cfe42b 28
fc4b0448 29homepage 'http://www.dbix-class.org/';
30resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
31resources 'license' => 'http://dev.perl.org/licenses/';
32resources 'repository' => 'git://git.shadowcat.co.uk/dbsrgits/DBIx-Class.git';
33resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
34resources 'bugtracker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class';
8057ed01 35
fc4b0448 36###
37### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends()
38### All of them *MUST* go to DBIx::Class::Optional::Dependencies
39###
8057ed01 40my $runtime_requires = {
fc4b0448 41 # FIXME - temporary, needs throwing out for something more efficient
42 'Data::Compare' => '1.22',
43
44 # DBI itself should be capable of installation and execution in pure-perl
45 # mode. However it has never been tested yet, so consider XS for the time
46 # being
47 'DBI' => '1.57',
48
49 # XS (or XS-dependent) libs
50 'Sub::Name' => '0.04',
51
52 # pure-perl (FatPack-able) libs
b8d22f13 53 'Class::Accessor::Grouped' => '0.10002',
9c1700e3 54 'Class::C3::Componentised' => '1.0009',
8057ed01 55 'Class::Inspector' => '1.24',
79680fc0 56 'Config::Any' => '0.20',
57 'Context::Preserve' => '0.01',
2b8cc2f2 58 'Data::Dumper::Concise' => '2.020',
8057ed01 59 'Data::Page' => '2.00',
b8d22f13 60 'Hash::Merge' => '0.12',
8057ed01 61 'MRO::Compat' => '0.09',
62 'Module::Find' => '0.06',
cd122820 63 'namespace::clean' => '0.20',
f4d7449c 64 'Path::Class' => '0.18',
b7b18f32 65 'Scope::Guard' => '0.03',
bf51641f 66 'SQL::Abstract' => '1.72',
20674fcd 67 'Try::Tiny' => '0.04',
79680fc0 68
c7d50a7d 69 # dual-life corelibs needing a specific bugfixed version
79680fc0 70 'File::Path' => '2.07',
fc4b0448 71};
cd122820 72
fc4b0448 73my $build_requires = {
74 # needed for testing only, not for operation
75 # we will move away from this dep eventually, perhaps to DBD::CSV or something
76 'DBD::SQLite' => '1.29',
8057ed01 77};
78
fc4b0448 79my $test_requires = {
80 'File::Temp' => '0.22',
81 'Test::Exception' => '0.31',
82 'Test::Warn' => '0.21',
83 'Test::More' => '0.94',
84 # not sure if this is necessary at all, ask schwern some day
85 'Test::Builder' => '0.94',
86
87 # this is already a dep of n::c, but just in case - used by t/55namespaces_cleaned.t
88 # remove and do a manual glob-collection if n::c is no longer a dep
89 'Package::Stash' => '0.28',
90};
bb7950c0 91
92# Bail out on parallel testing
93if (
94 ($ENV{HARNESS_OPTIONS}||'') =~ / (?: ^ | \: ) j(\d+) /x
95 and
96 $1 > 1
97) { die <<EOP }
98
99******************************************************************************
100******************************************************************************
101*** ***
102*** PARALLEL TESTING DETECTED ( \$ENV{HARNESS_OPTIONS} = 'j$1' ) ***
103*** ***
fc4b0448 104*** DBIC tests WILL FAIL. It is harder to make them parallel-friendly than ***
bb7950c0 105*** it should be (though work is underway). In the meantime you will have ***
106*** to adjust your environment and re-run the installation. Sorry! ***
107*** ***
108******************************************************************************
109******************************************************************************
110
111EOP
112
8057ed01 113# this is so we can order requires alphabetically
fc4b0448 114# copies are needed for potential author requires injection
8057ed01 115my $reqs = {
116 build_requires => { %$build_requires },
117 requires => { %$runtime_requires },
118 test_requires => { %$test_requires },
119};
3a4251e2 120
c78f9f5b 121# only do author-includes if not part of a `make` run
122if ($Module::Install::AUTHOR and ! $ENV{MAKELEVEL}) {
fc4b0448 123 # get options here, make $args available to all snippets
124 require Getopt::Long;
125 my $getopt = Getopt::Long::Parser->new(
126 config => [qw/gnu_getopt bundling_override no_ignore_case pass_through/]
127 );
128 my $args = {
129 skip_author_deps => undef,
130 };
131 $getopt->getoptions($args, 'skip_author_deps');
132 if (@ARGV) {
133 warn "\nIgnoring unrecognized option(s): @ARGV\n\n";
0424d17a 134 }
8057ed01 135
fc4b0448 136 require File::Spec;
137 # string-eval, not do(), because we need to provide the
138 # $reqs and $*_requires lexicals to the included file
139 # (some includes *do* modify $reqs above)
140 for (sort glob ( File::Spec->catfile('maint', 'Makefile.PL.inc', '*') ) ) {
141 eval scalar do { local (@ARGV, $/) = $_; <> }
142 or die ($@ || $!);
0424d17a 143 }
8057ed01 144}
fc4b0448 145else {
146 # make sure this Makefile can not be used to make a dist
0e016219 147 # (without the author includes there are no meta cleanup, no sanity checks, etc)
fc4b0448 148 postamble <<EOP;
149.PHONY: nonauthor_stop_distdir_creation
150create_distdir: nonauthor_stop_distdir_creation
151nonauthor_stop_distdir_creation:
152\t\$(NOECHO) \$(ECHO) Creation of dists in non-author mode is not allowed
153\t\$(NOECHO) \$(FALSE)
154EOP
155}
8057ed01 156
157# compose final req list, for alphabetical ordering
158my %final_req;
159for my $rtype (keys %$reqs) {
160 for my $mod (keys %{$reqs->{$rtype}} ) {
161
162 # sanity check req duplications
163 if ($final_req{$mod}) {
b718fd0a 164 die "$mod specified as both a '$rtype' and a '$final_req{$mod}[0]'\n";
8057ed01 165 }
166
167 $final_req{$mod} = [ $rtype, $reqs->{$rtype}{$mod}||0 ],
168 }
169}
170
171# actual require
172for my $mod (sort keys %final_req) {
173 my ($rtype, $ver) = @{$final_req{$mod}};
174 no strict 'refs';
175 $rtype->($mod, $ver);
176}
a410299d 177
fc4b0448 178# author-mode or not - this is where we show a list of missing deps
179# IFF we are running interactively
92f8f62a 180auto_install();
a410299d 181
713cc98e 182WriteAll();