[CDBI] Modperl setup

Matt S Trout dbix-class at trout.me.uk
Wed Dec 7 01:54:41 GMT 2005


On Tue, Dec 06, 2005 at 01:41:26PM -0800, Kate Yoak wrote:
> Damn - I hate it when you are right.  Unfortunately, my best guess for where
> the extra references live is a child_of relationship I wrote.  I don't use
> global variables (mama taught me better than that) - but I am also not doing
> anything by way of cleanup with child_of.  It's like has_a, only uses a
> separate field name.  So, $student->parent retrieves a Parent while
> $student->parent_id doesn't.  I love the relationship despite a long
> discussion on here points out that it probably doesn't add very much except
> stylistically.  But I just can't live with the idea of $child->parent_id
> returning anything other than an id.

You're far from the only one; DBIx::Class supports this style as well as
inflation, and Rose::DB::Object uses it by default.

I'm not firmly in either camp myself - ask me again in 6 months :)

-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +




More information about the ClassDBI mailing list