[pgh-pm] DBIx::SearchProfiles

Daniel J. Wright Dan at DWright.Org
Thu May 12 07:57:50 PDT 2005


> Someday I'll make it to another meeting.

Now that we are meeting in our new location, it will probably be easier
for you.

> Have you compared this to Class::DBI?

Yeah, we talked about that (briefly) last night.

Class::DBI is a bit more heavyweight than DBIx::SearchProfiles.   It is
both more powerful and more complicated.   One of the best features of
SearchProfiles, in my opion, is that even I can remember how to use it
most of the time without having to go back to the perldoc.

A major difference between Class::DBI and SearchProfiles is that when you
do a query with Class::DBI it returns a bunch of objects that you can do
other stuff with while SearchProfiles returns simple hashrefs.

> I've started converting some of my code to use that. Based on
> your slides, they look fairly similar. An additional feature of Class::DBI
> is the ability to declare the foreign key relationships. It creates
> accessor functions for each column.
> For example:
> $customer->name();
> $customer->orders(); should return an array of order objects.

I agree, that can be really powerful.  Casey is a strong advocate of doing
stuff like that.   I've used Class::DBI in past projects where referential
integrety was involved.  In the end, I found that I was happier avoiding
the complexity of Class::DBI by handling that stuff myself.   Your mileage
will vary.

> There are still two things I don't like. I have a 5 line query that I'm
> not sure how to convert to use Class::DBI.

Not being a Class::DBI expert, I'll leave this to somebody else to answer.

Regards,
-Dan




More information about the pgh-pm mailing list