Re: [Catalyst] Multiple DB, single instance of Cat

2008-09-24 Thread Matt S Trout
On Thu, Sep 11, 2008 at 11:58:31PM +0100, Nigel Stuckey wrote: Matt I stand corrected on DBIx! Yes, indeed I mean DBIx::Class. The code is in and works, but has a couple of issues. Firstly, it creates new classes and carries out a DB connect every time there is a request. Is there a

Re: [Catalyst] Multiple DB, single instance of Cat

2008-09-12 Thread James R. Leu
To get rid of the ACCEPT_CONTEXT redefined messages I modified that last for loop in Catalyst::Model::DBIC::Schema::new() to be: foreach my $moniker ($self-schema-sources) { my $classname = ${class}::$moniker; if (!defined(*{${classname}::ACCEPT_CONTEXT})) {

Re: [Catalyst] Multiple DB, single instance of Cat

2008-09-11 Thread Nigel Stuckey
Matt I stand corrected on DBIx! Yes, indeed I mean DBIx::Class. The code is in and works, but has a couple of issues. Firstly, it creates new classes and carries out a DB connect every time there is a request. Is there a way to make it more efficient by caching the classes and DB connects

Re: [Catalyst] Multiple DB, single instance of Cat

2008-09-11 Thread Andrew Rodland
On Thursday 11 September 2008 05:58:31 pm Nigel Stuckey wrote: Matt I stand corrected on DBIx! Yes, indeed I mean DBIx::Class. The code is in and works, but has a couple of issues. Firstly, it creates new classes and carries out a DB connect every time there is a request. Is there a way to

Re: [Catalyst] Multiple DB, single instance of Cat

2008-08-17 Thread Matt S Trout
On Fri, Aug 15, 2008 at 11:05:03AM +0100, Nigel Stuckey wrote: Another question about multiple databases. I have an existing application that uses a DBIx DB in the conventional way: as a model initialised at run time. All great so far... DBIx is the CPAN namespace for DBI extensions. There

[Catalyst] Multiple DB, single instance of Cat

2008-08-15 Thread Nigel Stuckey
Another question about multiple databases. I have an existing application that uses a DBIx DB in the conventional way: as a model initialised at run time. All great so far... However, I now need to make the application multi-organisation in the same instance of catalyst: users will select