I option functional and passing tests
[dbsrgits/DBIx-Class.git] / script / dbicadmin
index 1830cfa..52a5491 100755 (executable)
@@ -39,7 +39,7 @@ my ($opts, $usage) = describe_options(
       ['deploy' => 'Deploy the schema to the database',],
       ['select'   => 'Select data from the schema', ],
       ['insert'   => 'Insert data into the schema', ],
-      ['update'   => 'Update data in the schema', ], 
+      ['update'   => 'Update data in the schema', ],
       ['delete'   => 'Delete data from the schema',],
       ['op:s' => 'compatiblity option all of the above can be suppied as --op=<action>'],
       ['help' => 'display this help', { implies => { schema_class => '__dummy__' } } ],
@@ -62,6 +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']
   )
 );
 
@@ -86,6 +87,10 @@ if($opts->{selfinject_pod}) {
     );
 }
 
+if($opts->{I}) {
+    $opts->{include} = delete $opts->{I};
+}
+
 if($opts->{help}) {
     $usage->die();
 }
@@ -102,7 +107,7 @@ my $action = $opts->{action};
 
 $action = $opts->{op} if ($action eq 'op');
 
-print "Performig action $action...\n";
+print "Performing action $action...\n";
 
 my $res = $admin->$action();
 if ($action eq 'select') {