[Dbix-class] Configuration query - Catalyst::Model::DBIC::Schema
Dermot
paikkos at googlemail.com
Wed Jul 30 15:50:40 BST 2008
2008/7/30 Matt S Trout <dbix-class at trout.me.uk>:
> On Tue, Jul 29, 2008 at 09:15:42AM +0100, Dermot wrote:
>> 2008/7/28 Matt S Trout <dbix-class at trout.me.uk>:
>>
>> I don't want to stray off the topic. I used
>
> that explains __HOME__ versus path_to.
It would be useful to know where these vars are documented.
> my key point was "put the connect_info in the right damn place".
I hear you. I have been trying. I did manage to get my import script
to work with
<MyApp::Model::MyAppDB>
connect_info dbi:SQLite:__HOME__/motion.db
# connect_info SQLITE NoUser
<MyApp::Model::MyAppDB>
Once I used the fully qualified the name to my model.
Now I am stuck on my original point.
Using Catalyst::Model::DBIC::Schema with my Schema set-up/config file in
MyApp/Model/MyAppDB.pm which has
use base qw(Catalyst::Model::DBIC::Schema);
__PACKAGE__->config(
schema_class => 'MyApp::Schema::MyAppDB',
connect_info => [
"dbi:SQLite:datafile.db",
],
);
Unless connect_info uses the full path to the SQLite file, as below,
it fails with
DBIx::Class::ResultSet::count(): DBI Connection failed: unable to open
database file(1) at dbdimp.c line 94...
connect_info => [
'dbi:SQLite:/full/path/to/datafile.db',
],
What I had hoped was that I could somehow use __HOME__ or something
from the conf file to give the path.
Am I making sense? I hope I am not labouring the point too much. I do
appreciate that it's probably painful explaining stuff to a newbie and
I just hope I am not obviously missing the answer :-0
Dp.
More information about the DBIx-Class
mailing list