Dermot wrote:
I don't want to hard-code the path to the SQLite file but unless I do
I am getting DBI Connection failed: unable to open database file(1)
after a login attempt.

package YourApp::Model::YourModel;

use base qw(Catalyst::Model::DBIC::Schema);

__PACKAGE__->config( connect_info => [], schema_class => undef );

sub new {
   my ($me, $app, @rest) = @_;

   $me->config( connect_info => $app->config->{connect_info} );
   $me->config( schema_class => $app->config->{schema_class} );

   my $self  = $me->NEXT::new( $app, @rest );

   return $self;
}


Cut down from one of my models so untested

--

Regards

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to