WIP
[dbsrgits/DBIx-Class-Schema-Loader.git] / Makefile.PL
CommitLineData
2a72f15d 1use warnings;
2use strict;
ef8e9c69 3
4use 5.008001;
2a72f15d 5use inc::Module::Install 1.00;
ef8e9c69 6
509e7821 7use Getopt::Long();
8
9my $getopt = Getopt::Long::Parser->new(
10 config => [qw/gnu_getopt bundling_override no_ignore_case pass_through/]
11);
12my $args = {
13 skip_author_deps => undef,
14};
15$getopt->getoptions($args, 'skip_author_deps');
16if (@ARGV) {
17 warn "\nIgnoring unrecognized option(s): @ARGV\n\n";
18}
19
ef8e9c69 20use FindBin;
21use lib "$FindBin::Bin/lib";
22
2a72f15d 23perl_version '5.008001';
3fe9c5d9 24name 'DBIx-Class-Schema-Loader';
25all_from 'lib/DBIx/Class/Schema/Loader.pm';
26
9cb983b3 27test_requires 'Test::Exception';
d27f2b7b 28test_requires 'Test::More' => '0.94';
0c344f4e 29test_requires 'Test::Warn' => '0.21';
390bbe3f 30test_requires 'DBI' => '1.56';
83d82c02 31test_requires 'DBD::SQLite' => '1.29';
9cb983b3 32test_requires 'File::Copy';
33test_requires 'File::Temp' => '0.16';
502b65d4 34test_requires 'File::Path' => '2.07';
ff746964 35test_requires 'IPC::Open3' => 0;
eaf23084 36test_requires 'DBIx::Class::IntrospectableM2M' => 0;
3fe9c5d9 37
38requires 'File::Spec' => 0;
39requires 'Scalar::Util' => 0;
39d5612f 40requires 'Task::Weaken' => 0;
3fe9c5d9 41requires 'Data::Dump' => '1.06';
3fe9c5d9 42requires 'Lingua::EN::Inflect::Number' => '1.1';
4f7692f0 43requires 'Lingua::EN::Tagger' => '0.23';
44requires 'Lingua::EN::Inflect::Phrase' => '0.15';
3fe9c5d9 45requires 'Digest::MD5' => '2.36';
925f9a89 46requires 'Class::Accessor::Grouped' => '0.10002';
942bd5e0 47requires 'MRO::Compat' => '0.09';
cc15b78f 48requires 'Sub::Name' => 0;
6b6f0270 49requires 'Class::C3::Componentised' => '1.0008';
3fe9c5d9 50requires 'Carp::Clan' => 0;
adf7b1a9 51requires 'Class::Inspector' => '1.27';
6e8da818 52requires 'DBIx::Class' => '0.08127';
af31090c 53requires 'Class::Unload' => 0;
8793567f 54requires 'List::MoreUtils' => 0;
da793144 55requires 'namespace::clean' => '0.20';
3a89a69f 56requires 'Scope::Guard' => 0;
f3ea13a8 57requires 'Exporter' => '5.63';
906fa216 58requires 'Try::Tiny' => 0;
f9daf711 59requires 'String::ToIdentifier::EN' => '0.05';
ea3b8f03 60requires 'String::CamelCase' => '0.02';
23fd9773 61requires 'Hash::Merge' => 0;
3fe9c5d9 62
10b0a36e 63print <<"EOF";
64******************* DBIx::Class::Schema::Loader WARNING ***********************
65The default attributes for belongs_to relationships for foreign keys with no
66rules has been changed for most databases, and is soon changing for the rest,
67as ON DELETE/UPDATE and DEFERRABLE clauses for foreign keys are now being
68introspected.
69
70THIS MAY AFFECT YOUR DDL DIFFS WHEN DEPLOYING
71
72YOUR GENERATED CODE WILL ALMOST CERTAINLY CHANGE
73
74Read more about the changes in "relationship_attrs" in:
75
76perldoc DBIx::Class::Schema::Loader::Base
77
78https://metacpan.org/module/DBIx::Class::Schema::Loader::Base#relationship_attrs
79
80See also the "Changes" file for the last few revisions.
81*******************************************************************************
82EOF
83
509e7821 84if ($Module::Install::AUTHOR && ! $args->{skip_author_deps}) {
2a72f15d 85 eval { require Module::Install::ReadmeFromPod }
86 or die "\nYou need Module::Install::ReadmeFromPod installed to run this Makefile.PL in author mode:\n\n$@\n";
87
88 warn "\n*** AUTHOR MODE: some optional dependencies converted to hard requires.\n\n";
ff746964 89
ef8e9c69 90 require DBIx::Class::Schema::Loader::Optional::Dependencies;
01012543 91
ef8e9c69 92 test_requires map %$_, values %{ DBIx::Class::Schema::Loader::Optional::Dependencies->req_group_list };
93
94 DBIx::Class::Schema::Loader::Optional::Dependencies->_gen_pod;
2a72f15d 95
96 readme_from( 'lib/DBIx/Class/Schema/Loader.pm' );
97 realclean_files( qw[README MANIFEST lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod] );
3fe9c5d9 98}
99
ef8e9c69 100tests_recursive;
101
102install_script 'script/dbicdump';
103
64b844d0 104resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
105resources 'license' => 'http://dev.perl.org/licenses/';
edfab8b3 106resources 'repository' => 'git://git.shadowcat.co.uk/dbsrgits/DBIx-Class-Schema-Loader.git';
64b844d0 107resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
108
3fe9c5d9 109auto_install;
110WriteAll;
ef8e9c69 111
112# vim:et sts=4 sw=4 tw=0: