I was testing to dump the DBIx::Class
for my sample sqlite database on the windows 7 machine.
I have installed DBIx::Class::Schema::Loader
, along with DBI
and DBD::SQLite
module , but when I am using the script dbicdump
it giving the below error
C:\Users\Foo\Documents\dbDump>perl dbicdump.pl dump_directory=.\lib ^
More? -o components="[q{InflateColumn::DateTime}]" ^
More? -o preserve_case=1 ^
More? MyApp::Schema DBI::SQLite:./sqlite.db
DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Can't connect
to data source 'MyApp::Schema' because I can't work out what driver to use (it
doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not
set) at C:/Perl64/site/lib/DBIx/Class/Storage/DBI.pm line 1517. at dbicdump.pl
line 178
I tried googling it out but was not able to find any appropriate for to resolve the issue.
Looks like dbicdump
has got slightly confused when parsing your command line options. It thinks that MyApp::Schema
is the connection information, not DBI::SQLite:./sqlite.db
.
I suspect that's because you have missed the -o
that should go before the dump_directory=.\lib
option.