Re: Casting around for ideas...
[prev]
[thread]
[next]
[Date index for 2005/05/22]
Nic Gibson wrote:
> We've put together a fair amount of code using Class::DBI that
> represent fairly generic activities that we use in multiple
> applications/databases (things like an AuditTrail package for
> example).
>
> In 90% of the cases, this simply means the same class with a different
> database connection. Sometimes, we add a column or two. I'd really like
> to be able to do some reuse here.
>
> If I create package Foo and inherit Bar from it, I get errors that
> look like they are caused by the __grouper class method
> (Class::DBI::ColumnGrouper) not inheriting from my base
> ("'xxxx' is not column of Blah at test.pl line 3" or similar).
>
> If I reuse the same package in different locations, I still have a
> problem of how to associate the package with a particular database since
> I would 'normally' use a base package to define the data source.
>
> Has anyone tried to do what I'm describing and how did you go about
> it if you did? I'm hoping that I've missed something obvious here.
>
> TIA
Nic,
Are you asking "How do I use the same class with different database
connections"?
If so there have been many discussions on this list (and now in the
archives), that you could gain some insight from.
If you are asking a different question, I think you may need to restate
what you want to do, more clearly with examples
Thanks
Jay
|
(message missing)
|