Revert inlining of String::CamelCase::wordsplit() (RT#125929)
[dbsrgits/DBIx-Class-Schema-Loader.git] / Makefile.PL
1 use warnings;
2 use strict;
3
4 use 5.008001;
5 use ExtUtils::MakeMaker;
6 my ($dev_requires) = (do './maint/Makefile.PL.include' or die $@)
7     unless -f 'META.yml';
8
9 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
10 my %eumm_args = (
11     NAME => 'DBIx::Class::Schema::Loader',
12     VERSION_FROM => 'lib/DBIx/Class/Schema/Loader.pm',
13     LICENSE => 'perl',
14     MIN_PERL_VERSION => '5.008001',
15     CONFIGURE_REQUIRES => {
16         'ExtUtils::MakeMaker' => '0',
17     },
18     TEST_REQUIRES => {
19         'DBD::SQLite'     => '1.29',
20         'Test::Exception' => '0.31',
21         'Test::More'      => '0.94',
22         'Test::Warn'      => '0.21',
23         'Test::Deep'      => '0.107',
24         'Test::Differences' => '0.60',
25         # core, but specific versions not available on older perls
26         'File::Temp'      => '0.16',
27         'File::Path'      => '2.07',
28     },
29     test => {TESTS => 't/*.t t/*/*.t t/*/*/*.t'},
30     PREREQ_PM => {
31         'Carp::Clan'                  => 0,
32         'Class::Accessor::Grouped'    => '0.10008',
33         'Class::C3::Componentised'    => '1.0008',
34         'Class::Inspector'            => '1.27',
35         'Class::Unload'               => '0.07',
36         'curry'                       => '1.000000',
37         'Data::Dump'                  => '1.06',
38         'DBIx::Class'                 => '0.08127',
39         'Hash::Merge'                 => '0.12',
40         'Lingua::EN::Inflect::Number' => '1.1',
41         'Lingua::EN::Tagger'          => '0.23',
42         'Lingua::EN::Inflect::Phrase' => '0.15',
43         'List::Util'                  => '1.33',
44         'MRO::Compat'                 => '0.09',
45         'namespace::clean'            => '0.23',
46         'Scope::Guard'                => '0.20',
47         'String::ToIdentifier::EN'    => '0.05',
48         'String::CamelCase'           => '0.04',
49         'Sub::Util'                   => '1.40',
50         'Try::Tiny'                   => 0,
51         # core, but specific versions not available on older perls
52         'Digest::MD5'                 => '2.36',
53         'Exporter'                    => '5.63',
54     },
55     realclean => {
56         FILES => 'lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod'
57     },
58     EXE_FILES => [ qw(script/dbicdump) ],
59     META_MERGE => {
60         "meta-spec" => { version => 2 },
61         dynamic_config => 0,
62         resources => {
63             repository => {
64                 type => 'git',
65                 url => 'git@github.com/dbsrgits/dbix-class-schema-loader.git',
66                 web => 'https://github.com/dbsrgits/dbix-class-schema-loader',
67             },
68             x_IRC => 'irc://irc.perl.org/#dbix-class',
69             license => [ 'http://dev.perl.org/licenses/' ],
70             x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class',
71         },
72         no_index => {
73             directory => [qw(maint xt)],
74         },
75         prereqs => {
76             develop => { requires => $dev_requires || +{} },
77         },
78     },
79 );
80
81 sub _move_to {
82   my ($hash, $fromkey, $tokey) = @_;
83   $hash->{$tokey} = {
84     %{ $hash->{$tokey} || {} },
85     %{ delete($hash->{$fromkey}) || {} },
86   };
87 }
88 delete $eumm_args{META_MERGE} if $eumm_version < 6.45_01;
89 delete $eumm_args{CONFIGURE_REQUIRES}
90   if $eumm_version < 6.51_03; # too late to use so just delete
91 _move_to(\%eumm_args, 'TEST_REQUIRES', 'BUILD_REQUIRES')
92   if $eumm_version < 6.63_03;
93 _move_to(\%eumm_args, 'BUILD_REQUIRES', 'PREREQ_PM')
94   if $eumm_version < 6.55_01;
95 $eumm_args{NO_MYMETA} = 1
96   if $eumm_version >= 6.57_02 and $eumm_version < 6.57_07;
97 WriteMakefile(%eumm_args);
98
99 print <<"EOF";
100 ******************* DBIx::Class::Schema::Loader WARNING ***********************
101 The default attributes for belongs_to relationships for foreign keys with no
102 rules has been changed for most databases, and is soon changing for the rest,
103 as ON DELETE/UPDATE and DEFERRABLE clauses for foreign keys are now being
104 introspected.
105
106 THIS MAY AFFECT YOUR DDL DIFFS WHEN DEPLOYING
107
108 YOUR GENERATED CODE WILL ALMOST CERTAINLY CHANGE
109
110 Read more about the changes in "relationship_attrs" in:
111
112 perldoc DBIx::Class::Schema::Loader::Base
113
114 https://metacpan.org/module/DBIx::Class::Schema::Loader::Base#relationship_attrs
115
116 See also the "Changes" file for the last few revisions.
117 *******************************************************************************
118 EOF
119
120 # vim:et sts=4 sw=4 tw=0: