1 # $Id: Build.PL,v 1.10 2006-01-31 03:28:07 kycl4rk Exp $
5 use SQL::Translator::Module::Build;
7 my $builder = SQL::Translator::Module::Build->new(
9 dist_abstract => 'SQL DDL transformations and more',
10 dist_author => 'Ken Y. Clark <kclark@cpan.org>',
11 dist_version_from => 'lib/SQL/Translator.pm',
13 module_name => 'SQL::Translator',
24 'Class::Data::Inheritable' => 0.02,
25 'Class::MakeMethods' => 0,
29 'Parse::RecDescent' => 1.94,
37 'Spreadsheet::ParseExcel' => 0.2602,
38 'Text::ParseWords' => 0,
39 'Text::RecordParser' => 0.02,
40 'XML::Writer' => 0.500,
44 'File::Basename' => 0,
47 'Test::Exception' => 0,
48 'Test::Differences' => 0,
52 # Where to store additional files such as templates.
53 # TODO: Should be OS dependant. See Module::Build::os_type()
54 install_dir => { type=>'=s', default=>'/usr/local/share/sqlfairy' },
58 my $install_dir = $builder->args('install_dir');
59 print "SqlFairy needs to install some additional files such as templates.\n";
60 $install_dir = $builder->prompt( "Where should they go?", $install_dir );
63 # Add the install (and template) dir to the config data. They will then be
64 # available via the (Module::Build) generated SQL::Translator::ConfigData.
65 # During build time they are availiable from $builder->config_data( NAME )
66 my $template_dir = "$install_dir/template";
67 $builder->config_data( install_dir => $install_dir );
68 $builder->config_data( template_dir => $template_dir );
70 # Add build element for templates, these are processed by
71 # SQL::Translator::Module::Build::process_template_files
72 $builder->add_build_element('template');
73 $builder->install_path->{template} = $template_dir;
76 $builder->create_build_script;
77 print "Now run './Build', './Build test', and './Build install'\n";