[Dbix-class] Working with Moose - Best Practices

qjensen qjensen at scaled-solutions.com
Mon Aug 8 14:51:46 GMT 2011


I am working on a small proof of concept project meant to move our projects
toward more modern perl development practices. I would like to use DBIC and
Moose as the foundation for our business objects and would appreciate input
from the DBIC community on how the two modules are being used together.

I created my DBIC classes using make_schema_at and use_moose=>1. I assume
this creates Moose style accessors/mutators for my class attributes. Now I
want to extend these base classes to add other methods and simplify object
access ie My::App::Employee->add instead of
$schema->resultset('Employee')->create.

I started down the road of creating a Manager class and a set of parallel
classes to manage interaction with the underlying DBIC objects. I feel like
I am duplicating quite a bit of code for a fairly small payback.

Are most developers following the double declaration path I started with or
are their better ways/other modules that would make this work better? Is it
best to stick with double declaration until DBIC 0.9 comes out with full
Moose integration?

I really appreciate your feedback,
Quint

--
View this message in context: http://dbix-class.35028.n2.nabble.com/Working-with-Moose-Best-Practices-tp6664588p6664588.html
Sent from the DBIx-Class mailing list archive at Nabble.com.



More information about the DBIx-Class mailing list