[Dbix-class] Introspection for many to many relationships

Zbigniew Lukasiak zzbbyy at gmail.com
Sun Mar 9 10:55:39 GMT 2008


Hi there,

I think everyone agrees that it would be good to have introspection
for many to many relationships (to list all of those relations or
check if a method is an accessor for such relationship).  I do
understand that many to implemented in a different way from 'normal'
relations and the standard ->relationships and ->relationship_info
calls on DBIx::Class::ResultSource might not be easily adopted for
many to many.  So what I would propose is
for example:  ->many2many_relationships and
->many2many_relationship_info methods.  I remember that Matt asked me
to make it compatible with future Moose DBIC implementation.  I have
no experience with Moose - but I don't see why this should not be.  My
understanding is that with Moose the Row object will be able (via
standard Moose introspection) list all it's methods, including the
many to many accessors - this might make my proposal unnecessary but
not incompatible and until then we could use it.

And, I am adding this because this was misunderstood many times in the
past, my goal is any way to do the introspecion - not the particular
implementation of it - this was just an example.

-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/



More information about the DBIx-Class mailing list