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',
34 'Test::Exception' => '0',
35 'Test::More' => '0.92',
36 'Test::Warn' => '0.21',
39 my $runtime_requires = {
42 'Scalar::Util' => '0',
46 'Carp::Clan' => '6.0',
47 'Class::Accessor::Grouped' => '0.09002',
48 'Class::C3::Componentised' => '1.0005',
49 'Class::Inspector' => '1.24',
50 'Data::Page' => '2.00',
52 'MRO::Compat' => '0.09',
53 'Module::Find' => '0.06',
54 'Path::Class' => '0.18',
55 'Scope::Guard' => '0.03',
56 'SQL::Abstract' => '1.61',
57 'SQL::Abstract::Limit' => '0.13',
58 'Sub::Name' => '0.04',
59 'Data::Dumper::Concise' => '1.000',
62 # this is so we can order requires alphabetically
63 # copies are needed for author requires injection
65 build_requires => { %$build_requires },
66 requires => { %$runtime_requires },
67 test_requires => { %$test_requires },
70 # autogenerate docs and require extra modules for testing if we're in a checkout
71 if ($Module::Install::AUTHOR) {
73 print "Regenerating README\n";
74 system('pod2text lib/DBIx/Class.pm > README');
77 print "Removing MANIFEST\n";
81 print "Regenerating dbicadmin.pod\n";
82 system('perl script/dbicadmin --pod > lib/dbicadmin.pod');
84 print "Regenerating Optional/Dependencies.pod\n";
85 require DBIx::Class::Optional::Dependencies;
86 DBIx::Class::Optional::Dependencies->_gen_pod;
88 # FIXME Disabled due to unsolved issues, ask theorbtwo
89 # require Module::Install::Pod::Inherit;
93 ******************************************************************************
94 ******************************************************************************
96 *** AUTHOR MODE: all optional test dependencies converted to hard requires ***
98 ******************************************************************************
99 ******************************************************************************
103 $reqs->{test_requires} = {
104 %{$reqs->{test_requires}},
105 %{DBIx::Class::Optional::Dependencies->_all_optional_requirements},
109 # compose final req list, for alphabetical ordering
111 for my $rtype (keys %$reqs) {
112 for my $mod (keys %{$reqs->{$rtype}} ) {
114 # sanity check req duplications
115 if ($final_req{$mod}) {
116 die "$mod specified as both a '$rtype' and a '$final_req{$mod}[0]'\n";
119 $final_req{$mod} = [ $rtype, $reqs->{$rtype}{$mod}||0 ],
124 for my $mod (sort keys %final_req) {
125 my ($rtype, $ver) = @{$final_req{$mod}};
127 $rtype->($mod, $ver);
138 resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
139 resources 'license' => 'http://dev.perl.org/licenses/';
140 resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class/';
141 resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
143 # Deprecated/internal modules need no exposure
144 no_index directory => $_ for (qw|
145 lib/DBIx/Class/SQLAHacks
146 lib/DBIx/Class/PK/Auto
148 no_index package => $_ for (qw/
149 DBIx::Class::Storage::DBI::AmbiguousGlob
150 DBIx::Class::SQLAHacks DBIx::Class::Storage::DBIHacks
159 # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
160 if ($Module::Install::AUTHOR) {
162 # FIXME test_requires is not yet part of META
163 my %original_build_requires = ( %$build_requires, %$test_requires );
165 print "Regenerating META with author requires excluded\n";
166 Meta->{values}{build_requires} = [ grep
167 { exists $original_build_requires{$_->[0]} }
168 ( @{Meta->{values}{build_requires}} )