Dermot wrote:
> 2009/11/26 Scott Pham <scott.p...@gmail.com>:
>> Have you looked at DBIx::Class?
>>
> 
> I'd 2nd that. DBIx is the way forward. You should be looking to stop
> writing SQL statements and moving towards ORM. Try the example at
> http://search.cpan.org/~frew/DBIx-Class-0.08114/lib/DBIx/Class/Manual/Example.pod

I want to thank those who responded on list, and off-list.

I've always overlooked DBIx::Class as 'too intimidating' for my use, but
I must admit, after a day of reading the docs, and writing up some
example tests, I can't believe that I've waited so long to play with it.

I've already modified a few of my methods as test cases, then added a
couple of modification wrappers in my base class, and it has reduced the
amount of code in each method by at least 30%.

Not only that, it's literally trivial to implement redundant SQL
servers, and it has even helped me solve the problem I was having in
that I had to manually create a new db schema (in MySQL) each time I ran
prove on the .t files (the test config file has the project simply use a
throwaway SQLite db on the fly now).

Also, even though I'm retaining the calls to the db tables within their
respective classes, I can already see how easy it will be if/when I want
to migrate all db activity to a class of it's own.

Thanks for the recommendations, and if there are any contributors to
this project or its derivatives on the list, cheers!

Only a single business day of learning the basic in and outs, and I can
see already how I've wasted thousands of man hours doing it the 'old'
way in the past :)

Steve

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to