[Dbix-class] many-to-many with attributes (again)

Tobias Kremer list at funkreich.de
Mon Oct 15 08:27:18 GMT 2007


> The many-many helper will provide add_to_mm_name and similar methods that
> can take two hashrefs so you can provide far side and link attributes
> simultaneously - but for retrieval of the attributes the proxy trick is still
> the way to go.

Great and not so great. This means that whenever I add attributes (be it new
columns or just new custom methods) to the proxied class I'll have to
update the proxy array with these attributes, right? This is quite error
prone IMHO. I need full access to _all_ methods through the proxy.
Is there any way around this?

> If you find it cumbersome, automate it and send a patch, I've suggested this
> to the last half dozen people complaining about this and so far not a single
> one has found it's -that- cumbersome after all :)

Yeah, maybe nobody has a clue how to accomplish a more elegant solution in a
sane way :) Maybe you can point us in the right direction ...

Also, due to the fact that the DBIC wiki is offline for quite some time now,
there's no documentation anywhere concerning this method of accessing
attributes in a many-to-many link-table. Shouldn't this be in the Cookbook
or somewhere else? If so, I could provide a doc patch for it because I was
lucky enough to save the wiki page before it went off :)

--Tobias



More information about the DBIx-Class mailing list