cascade_copy docs (format fixed)
[dbsrgits/DBIx-Class-Historic.git] / Makefile.PL
1 use inc::Module::Install 0.67;
2 use strict;
3 use warnings;
4
5 use 5.006001; # delete this line if you want to send patches for earlier.
6
7 name     'DBIx-Class';
8 perl_version '5.006001';
9 all_from 'lib/DBIx/Class.pm';
10
11 requires 'Data::Page'                => 2.00;
12 requires 'Scalar::Util'              => 0;
13 requires 'SQL::Abstract'             => 1.20;
14 requires 'SQL::Abstract::Limit'      => 0.101;
15 requires 'Class::C3'                 => 0.13;
16 requires 'Class::C3::Componentised'  => 0;
17 requires 'Storable'                  => 0;
18 requires 'Carp::Clan'                => 0;
19 requires 'DBI'                       => 1.40;
20 requires 'Module::Find'              => 0;
21 requires 'Class::Inspector'          => 0;
22 requires 'Class::Accessor::Grouped'  => 0.05002;
23 requires 'JSON::Any'                 => 1.00; 
24 requires 'Scope::Guard'              => 0.03;
25 requires 'Digest::SHA1'              => 2.00;
26 requires 'Path::Class'               => 0;
27
28 # Perl 5.8.0 doesn't have utf8::is_utf8()
29 requires 'Encode'                    => 0 if ($] <= 5.008000);  
30
31 build_requires 'DBD::SQLite'         => 1.13;
32 build_requires 'Test::Builder'       => 0.33;
33 build_requires 'Test::Warn'          => 0.08;
34 build_requires 'Test::NoWarnings'    => 0.08;
35
36 install_script 'script/dbicadmin';
37
38 tests "t/*.t t/*/*.t";
39
40 # re-build README and require CDBI modules for testing if we're in a checkout
41
42 my @force_build_requires_if_author = qw(
43   DBIx::ContextualFetch
44   Class::Trigger
45   Time::Piece
46 );
47
48 if ($Module::Install::AUTHOR) {
49
50   foreach my $module (@force_build_requires_if_author) {
51     build_requires $module;
52   }
53
54   system('pod2text lib/DBIx/Class.pm > README');
55 }
56
57 auto_provides;
58
59 auto_install;
60
61 WriteAll;
62
63
64 if ($Module::Install::AUTHOR) {
65   # Need to do this _after_ WriteAll else it looses track of them
66   Meta->{values}{build_requires} = [ grep {
67     my $ok = 1;
68     foreach my $module (@force_build_requires_if_author) {
69       if ($_->[0] =~ /$module/) {
70         $ok = 0;
71         last;
72       }
73     }
74     $ok;
75   } @{Meta->{values}{build_requires}} ];
76
77   my @scalar_keys = Module::Install::Metadata::Meta_TupleKeys();
78   my $cr = Module::Install::Metadata->can("Meta_TupleKeys");
79   {
80     no warnings 'redefine';
81     *Module::Install::Metadata::Meta_TupleKeys = sub {
82       return $cr->(@_), 'resources';
83     };
84   }
85   Meta->{values}{resources} = [ 
86     [ 'MailingList', 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class' ],
87     [ 'IRC', 'irc://irc.perl.org/#dbix-class' ],
88   ];
89   Meta->write;
90 }
91
92
93