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