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',
29 'Test::Exception' => '0',
30 'Test::More' => '0.92',
31 'Test::Warn' => '0.21',
34 my $runtime_requires = {
37 'Scalar::Util' => '0',
41 'Carp::Clan' => '6.0',
42 'Class::Accessor::Grouped' => '0.09002',
43 'Class::C3::Componentised' => '1.0005',
44 'Class::Inspector' => '1.24',
45 'Data::Page' => '2.00',
47 'MRO::Compat' => '0.09',
48 'Module::Find' => '0.06',
49 'Path::Class' => '0.18',
50 'Scope::Guard' => '0.03',
51 'SQL::Abstract' => '1.61',
52 'SQL::Abstract::Limit' => '0.13',
53 'Sub::Name' => '0.04',
54 'Data::Dumper::Concise' => '1.000',
57 # this is so we can order requires alphabetically
58 # copies are needed for author requires injection
60 build_requires => { %$build_requires },
61 requires => { %$runtime_requires },
62 test_requires => { %$test_requires },
65 # re-build README and require extra modules for testing if we're in a checkout
66 if ($Module::Install::AUTHOR) {
68 print "Regenerating README\n";
69 system('pod2text lib/DBIx/Class.pm > README');
72 print "Removing MANIFEST\n";
76 print "Regenerating Optional/Dependencies.pod\n";
77 require DBIx::Class::Optional::Dependencies;
78 DBIx::Class::Optional::Dependencies->_gen_pod;
80 # FIXME Disabled due to unsolved issues, ask theorbtwo
81 # require Module::Install::Pod::Inherit;
85 ******************************************************************************
86 ******************************************************************************
88 *** AUTHOR MODE: all optional test dependencies converted to hard requires ***
90 ******************************************************************************
91 ******************************************************************************
95 $reqs->{test_requires} = {
96 %{$reqs->{test_requires}},
97 %{DBIx::Class::Optional::Dependencies->_all_optional_requirements},
101 # compose final req list, for alphabetical ordering
103 for my $rtype (keys %$reqs) {
104 for my $mod (keys %{$reqs->{$rtype}} ) {
106 # sanity check req duplications
107 if ($final_req{$mod}) {
108 die "$mod specified as both a '$rtype' and a '$final_req{$mod}[0]'\n";
111 $final_req{$mod} = [ $rtype, $reqs->{$rtype}{$mod}||0 ],
116 for my $mod (sort keys %final_req) {
117 my ($rtype, $ver) = @{$final_req{$mod}};
119 $rtype->($mod, $ver);
130 resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
131 resources 'license' => 'http://dev.perl.org/licenses/';
132 resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class/';
133 resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
135 # Deprecated/internal modules need no exposure
136 no_index directory => $_ for (qw|
137 lib/DBIx/Class/SQLAHacks
138 lib/DBIx/Class/PK/Auto
140 no_index package => $_ for (qw/
141 DBIx::Class::Storage::DBI::AmbiguousGlob
142 DBIx::Class::SQLAHacks DBIx::Class::Storage::DBIHacks
151 # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
152 if ($Module::Install::AUTHOR) {
154 # FIXME test_requires is not yet part of META
155 my %original_build_requires = ( %$build_requires, %$test_requires );
157 print "Regenerating META with author requires excluded\n";
158 Meta->{values}{build_requires} = [ grep
159 { exists $original_build_requires{$_->[0]} }
160 ( @{Meta->{values}{build_requires}} )