1 use inc::Module::Install 1.00;
5 # to deal wuth x.y.z versions properly
6 configure_requires 'ExtUtils::MakeMaker' => 6.54;
11 'Class::Data::Inheritable' => 0.02,
12 'Class::MakeMethods' => 0,
16 'IO::Scalar' => 2.110,
17 'Parse::RecDescent' => 1.962002,
20 'File::ShareDir' => 1.0,
23 'XML::Writer' => 0.500,
30 'Graph::Directed' => 0,
31 'Spreadsheet::ParseExcel' => 0.41,
32 'Text::ParseWords' => 0,
33 'Text::RecordParser' => 0.02,
34 'XML::LibXML' => 1.69,
38 'File::Basename' => 0,
40 'Test::Differences' => 0,
41 'Test::Exception' => 0,
47 name 'SQL-Translator';
48 author 'Ken Youens-Clark <kclark@cpan.org>';
49 abstract 'SQL DDL transformations and more';
51 repository 'git://git.shadowcat.co.uk/dbsrgits/SQL-Translator.git';
52 bugtracker 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=SQL-Translator';
54 resources Ratings => 'http://cpanratings.perl.org/d/SQL-Translator';
56 all_from 'lib/SQL/Translator.pm';
58 for my $type (qw/requires recommends test_requires/) {
61 for my $mod (keys %{$deps->{$type} || {} }) {
62 $f->($mod, $deps->{$type}{$mod});
83 if ($Module::Install::AUTHOR) {
84 _recompile_grammars();
85 _recreate_rt_source();
90 sub _recompile_grammars {
91 # placeholder, will be used to recompile P::RD parsers before shipping
92 # will also allow to lose dependency on P::RD
95 sub _recreate_rt_source {
96 my $base_xml = "t/data/roundtrip.xml";
97 my $autogen_yaml = "t/data/roundtrip_autogen.yaml";
99 print "Updating $autogen_yaml\n";
101 unlink $autogen_yaml;
107 require SQL::Translator;
108 require SQL::Translator::Parser::XML;
110 open (my $fh, '>', $autogen_yaml) or die "$autogen_yaml: $!\n";
112 my $tr = SQL::Translator->new;
113 my $yaml = $tr->translate (
117 ) or die sprintf ("Unable to translate %s to YAML: %s\n",
119 $tr->error || 'error unknown'
129 =========================================================================
130 =============== WARNING !!! =================
131 =========================================================================
133 Unable to update the roundtrip schema (attempt triggered by AUTHOR mode).
134 We will still generate a Makefile, but be aware that if you build a dist
135 this way, it *WILL* be broken.
137 -------------------------------------------------------------------------
140 Press Enter to continue.