On Thu, Sep 13, 2007 at 10:58:08AM +0100, Ian Docherty wrote:
I have found a thread on DBIx-class mailing list that throws some light
on this using
http://search.cpan.org/~ash/DBIx-Class-0.08006/lib/DBIx/Class/Schema.pm#load_namespaces
This seems to solve the problem for putting such logic into the
Model/Schema but would it be better to put this type of logic into a
business logic layer? In which case how would I obtain a $schema object?
Would I have to then pass this as a parameter to the method?
I have found a thread on DBIx-class mailing list that throws some light
on this using
http://search.cpan.org/~ash/DBIx-Class-0.08006/lib/DBIx/Class/Schema.pm#load_namespaces
This seems to solve the problem for putting such logic into the
Model/Schema but would it be better to put this type of logic into a
business logic layer? In which case how would I obtain a $schema object?
Would I have to then pass this as a parameter to the method?
The real question is whether your ORM should be directly in the model or
not, but that's a whole different thread.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/