From: Dagfinn Ilmari Mannsåker Date: Sat, 24 May 2008 01:18:27 +0000 (+0000) Subject: Add "dbicdump" script for easy commandline dumping X-Git-Tag: 0.04999_06~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff746964a437e42a7edfd99ec68d366442822c9d;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Add "dbicdump" script for easy commandline dumping --- diff --git a/Changes b/Changes index 4435ccd..f8c63a9 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for Perl extension DBIx::Class::Schema::Loader 0.04999_06 Not Yet Released - Singularise table monikers by default - Strip trailing _id from single-column belongs_to relationships + - Add "dbicdump" script for easy commandline dumping 0.04999_05 Mon Apr 14, 2008 - Fix limiting table list to the specified schema for DB2 diff --git a/Makefile.PL b/Makefile.PL index deee383..8d417c0 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,6 +9,7 @@ test_requires 'DBI' => '1.56'; test_requires 'DBD::SQLite' => '1.12'; test_requires 'File::Path' => 0; test_requires 'Class::Unload' => 0; +test_requires 'IPC::Open3' => 0; requires 'File::Spec' => 0; requires 'Scalar::Util' => 0; @@ -24,6 +25,8 @@ requires 'Carp::Clan' => 0; requires 'Class::Inspector' => 0; requires 'DBIx::Class' => '0.07006'; +install_script 'script/dbicdump'; + # This is my manual hack for better feature control # If you want to change the default answer for a feature, # set the appropriate environment variable, like diff --git a/script/dbicdump b/script/dbicdump new file mode 100755 index 0000000..94ec849 --- /dev/null +++ b/script/dbicdump @@ -0,0 +1,68 @@ +#!/usr/bin/perl + +=head1 NAME + +dbicdump - Dump a schema using DBIx::Class::Schema::Loader + +=head1 SYNOPSIS + + dbicdump [-o = ] + +=head1 DESCRIPTION + +Dbicdump generates a L schema using +L and dumps it to disk. + +You can pass any L constructor option using +C<< -o