On 27 April 2012 14:25, Glen Diener <[email protected]> wrote:
> I'm new to Catalyst and have nearly completed the development of my first 
> Catalyst web site. I'm needing to implement scripts to do some off-line 
> database processing and would like to use the DBIx model created and 
> implemented for the Catalyst site. I'm sure this must be possible, but, I've 
> not been successful.

Just a suggestion, but we do it like this:

[ your favourite invocation of FindBin or use of $0 or whatever ]
    use Config::JFDI;
    my $config = Config::JFDI->open( name => 'MyApp', path => dirname ($Bin) );
...
    use MyApp::Schema;
    my $schema = MyApp::Schema->connect(
$config->{'Model::DB'}->{connect_info} );
...

It's also possible (likely?) that you just can't connect to the
desired DB due to not having the right juju in pg_hba.conf, do check
that you have the right permissions for the user you're logged in as.

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to