Let's say I have two DB domains: prod/dev and two DB types: a/b.  All
four combinations have 99% of the same data structure but need different
login info and some slightly different fields (e.g. the table 'cats' in
dev-a has an extra timestamp column).

I've set up all the right things in a Rose::DB class to support this.
Now I find myself with the need for four class hierarchies to handle
slightly different things in those four environments.  Instead, I'm
wondering if I can have:

DB/auto/prod/a/Cats.pm
DB/auto/prod/b/Cats.pm
DB/auto/dev/a/Cats.pm
DB/auto/dev/b/Cats.pm
DB/Cats.pm
DB/BaseObject.pm

so that if I use Cats.pm with the dev-a database, BaseObject.pm will do
the right thing to load DB/auto/dev/a/Cats.pm.  The alternative I can
see is to use something like Template to produce a different Cats.pm
depending on the database combination.  I like the Template approach a
bit more, actually.

Has anyone done this?  Am I missing something obvious?

Ted

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to