On Mon, Jul 28, 2008 at 02:02:04PM +0100, Peter Flanigan wrote:
> 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} );

Right. Except now you just set global class data with that information.

And the feature's already there to do what you need, anyway - see Charlie
Garrison's post for how you -should- be doing it.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/

_______________________________________________
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