1 use inc::Module::Install 0.91;
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,
13 'Digest::SHA1' => 2.00,
16 'IO::Scalar' => 2.110,
17 'Parse::RecDescent' => 1.962002,
19 'Class::Accessor::Fast' => 0,
21 'File::ShareDir' => 1.0,
23 'XML::Writer' => 0.500,
29 'Graph::Directed' => 0,
30 'Spreadsheet::ParseExcel' => 0.41,
31 'Text::ParseWords' => 0,
32 'Text::RecordParser' => 0.02,
33 'XML::LibXML' => 1.69,
37 'File::Basename' => 0,
39 'Test::Differences' => 0,
40 'Test::Exception' => 0,
46 name 'SQL-Translator';
47 author 'Ken Youens-Clark <kclark@cpan.org>';
48 abstract 'SQL DDL transformations and more';
50 repository 'https://sqlfairy.svn.sourceforge.net/svnroot/sqlfairy';
51 bugtracker 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=SQL-Translator';
53 resources Ratings => 'http://cpanratings.perl.org/d/SQL-Translator';
55 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();
91 sub _recompile_grammars {
92 # placeholder, will be used to recompile P::RD parsers before shipping
93 # will also allow to lose dependency on P::RD
96 sub _recreate_rt_source {
97 my $base_xml = "t/data/roundtrip.xml";
98 my $autogen_yaml = "t/data/roundtrip_autogen.yaml";
100 print "Updating $autogen_yaml\n";
102 unlink $autogen_yaml;
108 require SQL::Translator;
109 require SQL::Translator::Parser::XML;
111 open (my $fh, '>', $autogen_yaml) or die "$autogen_yaml: $!\n";
113 my $tr = SQL::Translator->new;
114 my $yaml = $tr->translate (
118 ) or die sprintf ("Unable to translate %s to YAML: %s\n",
120 $tr->error || 'error unknown'
130 =========================================================================
131 =============== FATAL ERROR =================
132 =========================================================================
134 Unable to update the roundtrip schema (attempt triggered by AUTHOR mode).
135 Aborting Makefile generation.