[cgiapp] Class::MOP? Really?

Daniel Sterling dan at lost-habit.com
Sat Oct 20 12:17:37 EDT 2007


Ben Hitz wrote:
> We have been converting our hand-rolled Database API to DBIx::Class, 
> which uses Class::Accessor (actually an extension written for DBIC) 
> called Class:Accessor::Grouped and Class:C3 to dispatch.
I am just learning DBIx::Class, also with the intent of using it to 
convert from a straight-DBI app. I gather it was written before Moose 
was production-ready; there is some talk now of reworking it to use 
Moose (and therefore Class::MOP), but I don't know how far along any of 
that is.

Speaking of dispatch, Moosanites are recommending Roles over Multiple 
Inheritance, as well. Also, there is no reason one can't write a DBIC 
module that also uses Moose.

But, getting back to the original topic, I agree with Ricardo that, 
since the name of the CGI::Application game is simplicity, adding any 
class meta-programming to its Perl 5 core doesn't really make sense, 
especially when speed and size are affected.

Having said that, these modules (DBIC, Moose) are indeed useful tools, 
and I would also like to hear any stories people have about using them. 
I have always been skeptical about SQL-auto-generation systems, but I 
think the consensus is that DBIx::Class actually does ORM right. And, it 
lets you get to the guts and write SQL easily enough if/when you need to.

I'll know more firsthand when I've written more code using it :)

-- Dan



More information about the cgiapp mailing list