2017-09-22 4 views
0

Windows 7 머신에 샘플 sqlite 데이터베이스의 DBIx::Class을 덤프하려고 테스트했습니다. 내가 DBIDBD::SQLite 모듈과 함께, DBIx::Class::Schema::Loader를 설치,하지만 난 스크립트 dbicdump는 아래의 오류DBI_DRIVER env가 dbicdump를 실행하는 동안 var가 설정되지 않았습니다.

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 

을주는 사용하고 때 나는 그것을 인터넷 검색을하지만를 해결하기위한 적절한를 찾을 수 없습니다 시도 발행물.

답변

2

dbicdump은 명령 줄 옵션을 구문 분석 할 때 약간 혼란스러워합니다. 그것은 MyApp::Schema이 연결 정보이며 DBI::SQLite:./sqlite.db이 아니라고 생각합니다.

dump_directory=.\lib 옵션보다 먼저 사용해야 할 -o을 놓친 것 같습니다.

관련 문제