X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FIdiotBox%2FStore%2FSQLite.pm;fp=lib%2FApp%2FIdiotBox%2FStore%2FSQLite.pm;h=377c87b27a1f7ede97cc3e2a18349bde5110f1bf;hb=71a02d85ebece24abbc547892dd252836cf1bf6d;hp=2bd60e66bebdc29562dfbdb3bcbe76f76a9c57ed;hpb=d9702c6d2c59be57383275e22cbc7c8b11c54ba6;p=catagits%2FApp-IdiotBox.git diff --git a/lib/App/IdiotBox/Store/SQLite.pm b/lib/App/IdiotBox/Store/SQLite.pm index 2bd60e6..377c87b 100644 --- a/lib/App/IdiotBox/Store/SQLite.pm +++ b/lib/App/IdiotBox/Store/SQLite.pm @@ -129,17 +129,15 @@ sub bind { bless({ idiotbox => $idiotbox }, $class)->_bind; } -my $DSN = 'dbi:SQLite:idiotbox.db'; - sub _new_db_store { - DBIx::Data::Store->connect($DSN); + DBIx::Data::Store->connect("dbi:SQLite:$_[1]"); } sub _bind { my $self = shift; my $idiotbox = $self->{idiotbox}; - my $db_store = $self->_new_db_store; + my $db_store = $self->_new_db_store($idiotbox->config->{db_file}); foreach my $to_bind (qw(recent_announcements buckets)) { $idiotbox->{$to_bind} = _bind_set($to_bind, { raw_store => $db_store });