1 use inc::Module::Install 0.93;
9 use lib "$FindBin::Bin/lib";
12 ### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends()
13 ### All of them should go to DBIx::Class::Optional::Dependencies
18 perl_version '5.008001';
19 all_from 'lib/DBIx/Class.pm';
21 my $build_requires = {
22 'DBD::SQLite' => '1.25',
26 'File::Temp' => '0.22',
27 'Test::Builder' => '0.33',
28 'Test::Exception' => '0',
29 'Test::More' => '0.92',
30 'Test::Warn' => '0.21',
33 my $runtime_requires = {
36 'Scalar::Util' => '0',
40 'Carp::Clan' => '6.0',
41 'Class::Accessor::Grouped' => '0.09002',
42 'Class::C3::Componentised' => '1.0005',
43 'Class::Inspector' => '1.24',
44 'Data::Page' => '2.00',
46 'MRO::Compat' => '0.09',
47 'Module::Find' => '0.06',
48 'Path::Class' => '0.18',
49 'Scope::Guard' => '0.03',
50 'SQL::Abstract' => '1.61',
51 'SQL::Abstract::Limit' => '0.13',
52 'Sub::Name' => '0.04',
53 'Data::Dumper::Concise' => '1.000',
56 # this is so we can order requires alphabetically
57 # copies are needed for author requires injection
59 build_requires => { %$build_requires },
60 requires => { %$runtime_requires },
61 test_requires => { %$test_requires },
64 # re-build README and require extra modules for testing if we're in a checkout
65 if ($Module::Install::AUTHOR) {
67 print "Regenerating README\n";
68 system('pod2text lib/DBIx/Class.pm > README');
71 print "Removing MANIFEST\n";
75 print "Regenerating Optional/Dependencies.pod\n";
76 require DBIx::Class::Optional::Dependencies;
77 DBIx::Class::Optional::Dependencies->_gen_pod;
79 # FIXME Disabled due to unsolved issues, ask theorbtwo
80 # require Module::Install::Pod::Inherit;
84 ******************************************************************************
85 ******************************************************************************
87 *** AUTHOR MODE: all optional test dependencies converted to hard requires ***
89 ******************************************************************************
90 ******************************************************************************
94 $reqs->{test_requires} = {
95 %{$reqs->{test_requires}},
96 %{DBIx::Class::Optional::Dependencies->_all_optional_requirements},
100 # compose final req list, for alphabetical ordering
102 for my $rtype (keys %$reqs) {
103 for my $mod (keys %{$reqs->{$rtype}} ) {
105 # sanity check req duplications
106 if ($final_req{$mod}) {
107 die "$mod specified as both a '$rtype' and a '$final_req{$mod}[0]'\n";
110 $final_req{$mod} = [ $rtype, $reqs->{$rtype}{$mod}||0 ],
115 for my $mod (sort keys %final_req) {
116 my ($rtype, $ver) = @{$final_req{$mod}};
118 $rtype->($mod, $ver);
129 resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
130 resources 'license' => 'http://dev.perl.org/licenses/';
131 resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class/';
132 resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
134 # Deprecated/internal modules need no exposure
135 no_index directory => $_ for (qw|
136 lib/DBIx/Class/SQLAHacks
137 lib/DBIx/Class/PK/Auto
139 no_index package => $_ for (qw/
140 DBIx::Class::SQLAHacks DBIx::Class::Storage::DBIHacks
149 # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
150 if ($Module::Install::AUTHOR) {
152 # FIXME test_requires is not yet part of META
153 my %original_build_requires = ( %$build_requires, %$test_requires );
155 print "Regenerating META with author requires excluded\n";
156 Meta->{values}{build_requires} = [ grep
157 { exists $original_build_requires{$_->[0]} }
158 ( @{Meta->{values}{build_requires}} )