Refactor insert logic (Row should not handle SQLA options)
[dbsrgits/DBIx-Class.git] / script / dbicadmin
index 3be43c2..16e97fe 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use warnings;
@@ -62,8 +62,7 @@ my ($opts, $usage) = describe_options(
     ['force' => 'Be forceful with some operations'],
     ['trace' => 'Turn on DBIx::Class trace output'],
     ['quiet' => 'Be less verbose'],
-    ['debug' => 'Print debug information'],
-    ['I:s@' => 'Same as perl\'s -I'],
+    ['I:s@' => 'Same as perl\'s -I, prepended to current @INC'],
   )
 );
 
@@ -88,12 +87,14 @@ if($opts->{selfinject_pod}) {
     );
 }
 
+# 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