1 use inc::Module::Install 0.93;
9 use lib "$FindBin::Bin/lib";
11 # adjust ENV for $AUTHOR system() calls
13 $ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
17 ### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends()
18 ### All of them should go to DBIx::Class::Optional::Dependencies
23 perl_version '5.008001';
24 all_from 'lib/DBIx/Class.pm';
26 my $build_requires = {
27 'DBD::SQLite' => '1.25',
31 'File::Temp' => '0.22',
32 'Test::Builder' => '0.33',
33 'Test::Exception' => '0',
34 'Test::More' => '0.92',
35 'Test::Warn' => '0.21',
38 my $runtime_requires = {
39 'Carp::Clan' => '6.0',
40 'Class::Accessor::Grouped' => '0.09002',
41 'Class::C3::Componentised' => '1.0005',
42 'Class::Inspector' => '1.24',
43 'Data::Page' => '2.00',
45 'MRO::Compat' => '0.09',
46 'Module::Find' => '0.06',
47 'Path::Class' => '0.18',
48 'SQL::Abstract' => '1.61',
49 'SQL::Abstract::Limit' => '0.13',
50 'Sub::Name' => '0.04',
51 'Data::Dumper::Concise' => '1.000',
52 'Scope::Guard' => '0.03',
53 'Context::Preserve' => '0.01',
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 },
65 # require extra modules for testing if we're in a checkout
66 if ($Module::Install::AUTHOR) {
68 ******************************************************************************
69 ******************************************************************************
71 *** AUTHOR MODE: all optional test dependencies converted to hard requires ***
73 ******************************************************************************
74 ******************************************************************************
78 require DBIx::Class::Optional::Dependencies;
79 $reqs->{test_requires} = {
80 %{$reqs->{test_requires}},
81 %{DBIx::Class::Optional::Dependencies->_all_optional_requirements},
85 # compose final req list, for alphabetical ordering
87 for my $rtype (keys %$reqs) {
88 for my $mod (keys %{$reqs->{$rtype}} ) {
90 # sanity check req duplications
91 if ($final_req{$mod}) {
92 die "$mod specified as both a '$rtype' and a '$final_req{$mod}[0]'\n";
95 $final_req{$mod} = [ $rtype, $reqs->{$rtype}{$mod}||0 ],
100 for my $mod (sort keys %final_req) {
101 my ($rtype, $ver) = @{$final_req{$mod}};
103 $rtype->($mod, $ver);
108 # re-create various autogenerated documentation bits
109 if ($Module::Install::AUTHOR) {
111 print "Regenerating README\n";
112 system('pod2text lib/DBIx/Class.pm > README');
115 print "Removing MANIFEST\n";
119 print "Regenerating dbicadmin.pod\n";
120 system('perl script/dbicadmin --pod > lib/dbicadmin.pod');
122 print "Regenerating Optional/Dependencies.pod\n";
123 require DBIx::Class::Optional::Dependencies;
124 DBIx::Class::Optional::Dependencies->_gen_pod;
126 # FIXME Disabled due to unsolved issues, ask theorbtwo
127 # require Module::Install::Pod::Inherit;
139 resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
140 resources 'license' => 'http://dev.perl.org/licenses/';
141 resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class/';
142 resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
144 # Deprecated/internal modules need no exposure
145 no_index directory => $_ for (qw|
146 lib/DBIx/Class/SQLAHacks
147 lib/DBIx/Class/PK/Auto
149 no_index package => $_ for (qw/
150 DBIx::Class::SQLAHacks DBIx::Class::Storage::DBIHacks
157 # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
158 if ($Module::Install::AUTHOR) {
160 # FIXME test_requires is not yet part of META
161 my %original_build_requires = ( %$build_requires, %$test_requires );
163 print "Regenerating META with author requires excluded\n";
164 Meta->{values}{build_requires} = [ grep
165 { exists $original_build_requires{$_->[0]} }
166 ( @{Meta->{values}{build_requires}} )