[Catalyst] connecting to more than one database

Chisel Wright chisel at herlpacker.co.uk
Thu Jul 3 17:46:29 BST 2008


On Thu, Jul 03, 2008 at 09:30:22PM +0530, jagdish eashwar wrote:
>    Putting all the tables in one database is a solution. I am afraid,
>    however, that when I create a model using script/MyApp_create.pl for a
>    specific Catalyst application,  I'll get all the tables in the database
>    into my  DBIC  schema. Is there a way of making MyApp_create.pl pick up
>    only a subset of the tables?

You could let script/MyApp_create.pl create all the files for all the
tables, then (copy and) edit MyApp/Schema.pm to use load_classes($listref).

Copy it and change the list for the other set of tables.

You'd then have MyApp/Schema1.pm and MyApp/Schema2.pm that only load the
subset you're interested in.

Can't promise it's sane and without issues, but it's a possible
solution.
-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/

  Two Eskimos sitting in a kayak were chilly; but when they lit a fire in the
  craft, it sank, proving once and for all that you can't have your kayak and
  heat it.



More information about the Catalyst mailing list