perl modules shouldnt munge @INC; thats the job of the script
[dbsrgits/DBIx-Class.git] / script / dbicadmin
index 3be43c2..6ab9d09 100755 (executable)
@@ -14,6 +14,7 @@ BEGIN {
 use DBIx::Class::Admin::Descriptive;
 #use Getopt::Long::Descriptive;
 use DBIx::Class::Admin;
+require lib;
 
 my $short_description = "utility for administrating DBIx::Class schemata";
 my $synopsis_text =q|
@@ -62,8 +63,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,8 +88,9 @@ 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};
+    lib->import(delete $opts->{i});
 }
 
 if($opts->{help}) {