GetOptions(
'schema=s' => \my $schema_class,
'class=s' => \my $resultset_class,
+ 'connect=s' => \my $connect,
'op=s' => \my $op,
'set=s' => \my $set,
'where=s' => \my $where,
'trace' => \my $trace,
'quiet' => \my $quiet,
'help' => \my $help,
+ 'tlibs' => \my $t_libs,
);
+if ($t_libs) {
+ unshift( @INC, 't/lib', 'lib' );
+}
+
pod2usage(1) if ($help);
$ENV{DBIX_CLASS_STORAGE_DBI_DEBUG} = 1 if ($trace);
die('No schema specified') if(!$schema_class);
eval("require $schema_class");
die('Unable to load schema') if ($@);
-my $schema = $schema_class->connect();
+$connect = jsonToObj( $connect ) if ($connect);
+my $schema = $schema_class->connect(
+ ( $connect ? @$connect : () )
+);
die('No class specified') if(!$resultset_class);
my $resultset = eval{ $schema->resultset($resultset_class) };
The name of the class, within your schema, that you want to run
the operation on.
+=head2 connect
+
+A JSON array to be passed to your schema class upon connecting.
+The array will need to be compatible with whatever the DBIC
+->connect() method requires.
+
=head2 set
This option must be valid JSON data string and is passed in to
Turns on tracing on the DBI storage, thus printing SQL as it is
executed.
+=head2 tlibs
+
+This option is purely for testing during the DBIC installation. Do
+not use it.
+
=head1 JSON
JSON is a lightweight data-interchange format. It allows you