in reply to Placing Catalyst Database Connections Settings Outside .conf File

What errors are you getting?

The doucmentation mentions Config::General, so maybe the problem isn't Catalyst related at all but more about how to make Config::General do your work?

Maybe you can reduce the problem to a set of two or three small, self-contained files that reproduce your problem? It is hard for us to replicate your situation as we don't have your setup and Catalyst installation etc.

  • Comment on Re: Placing Catalyst Database Connections Settings Outside .conf File

Replies are listed 'Best First'.
Re^2: Placing Catalyst Database Connections Settings Outside .conf File
by varanasi (Scribe) on Sep 07, 2016 at 00:43 UTC

    Certainly a reasonable request.

    I'll post the detailed errors. Coming up with simple instances that reproduce the problem is tough because, at least for me, Catalyst can be impenetrable.

    Probably what I'll end up doing is creating two config files -- one to be read by Catalyst and one by the scripts, at least until I can figure out a better solution.

      I am a fool.

      When I set out to copy the exact language of the error I was getting with one of the options, I realized I was using the built-in server incorrectly -- if it is not run from the directory containing the catalyst app, it will load the app, report no errors but break when it cannot locate the database because of a path problem.

      Thanks for the advice and forbearance.

        This might be what you're after.

          dsn => 'dbi:SQLite:' . SamPool->path_to('/data/SamPool.db'),

        If not, check out Config::JFDI. Many Cat devs use this to consume the application's configuration in different contexts.