X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=script%2Fdbicadmin;h=10cd89f7fb40589ac4eb5b9390762801e794a5b5;hb=9859bf7a4ab106f41a4373d8910a84f820e2fcf8;hp=cc24560600a54427c7fdfe5ba1dc805f7d6e4016;hpb=099f10d17d95b08b12a9c88129c65b4bab0b60e2;p=dbsrgits%2FDBIx-Class.git diff --git a/script/dbicadmin b/script/dbicadmin index cc24560..10cd89f 100755 --- a/script/dbicadmin +++ b/script/dbicadmin @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; @@ -50,7 +50,7 @@ my ($opts, $usage) = describe_options( ['resultset|resultset-class|class:s' => 'The resultset to operate on for data manipulation' ], ['config-stanza:s' => 'Where in the config to find the connection_info, supply in form MyApp::Model::DB',], ['config:s' => 'Supply the config file for parsing by Config::Any', { depends => 'config_stanza'} ], - ['connect-info:s%' => 'Supply the connect info as additonal options ie -I dsn= user= password= '], + ['connect-info:s%' => 'Supply the connect info as additional options ie -I dsn= user= password= '], ['connect:s' => 'Supply the connect info as a json string' ], ['sql-dir:s' => 'The directory where sql diffs will be created'], ['sql-type:s' => 'The RDBMs flavour you wish to use'], @@ -87,13 +87,14 @@ if($opts->{selfinject_pod}) { ); } -# FIXME - lowercasin will eventually go away when Getopt::Long::Descriptive is fixed +# FIXME - lowercasing will eventually go away when Getopt::Long::Descriptive is fixed if($opts->{i}) { - $opts->{include_dirs} = delete $opts->{i}; + require lib; + lib->import( @{delete $opts->{i}} ); } if($opts->{help}) { - $usage->die(); + $usage->die(); } # option compatability mangle