X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=script%2Fdbicadmin;h=16e97fecdd2f11e3cbfb5bac3964757e8ac27e0c;hb=a85b7ebe9762ca64a08468f6c8f27a0ae583d38c;hp=52a54912813daaa368fd470a12be73d5e0b79105;hpb=b13aab4ff956894c2dcfdfb2c1e1d8aa04cf635d;p=dbsrgits%2FDBIx-Class.git diff --git a/script/dbicadmin b/script/dbicadmin index 52a5491..16e97fe 100755 --- a/script/dbicadmin +++ b/script/dbicadmin @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; @@ -62,7 +62,7 @@ my ($opts, $usage) = describe_options( ['force' => 'Be forceful with some operations'], ['trace' => 'Turn on DBIx::Class trace output'], ['quiet' => 'Be less verbose'], - ['I:s@' => 'Same as perl\'s -I'] + ['I:s@' => 'Same as perl\'s -I, prepended to current @INC'], ) ); @@ -87,22 +87,22 @@ if($opts->{selfinject_pod}) { ); } -if($opts->{I}) { - $opts->{include} = delete $opts->{I}; +# FIXME - lowercasing will eventually go away when Getopt::Long::Descriptive is fixed +if($opts->{i}) { + require lib; + lib->import( @{delete $opts->{i}} ); } if($opts->{help}) { - $usage->die(); + $usage->die(); } # option compatability mangle if($opts->{connect}) { $opts->{connect_info} = delete $opts->{connect}; } - my $admin = DBIx::Class::Admin->new( %$opts ); - my $action = $opts->{action}; $action = $opts->{op} if ($action eq 'op');