NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
You're hiding the details ... (Score:1)
Role composition doesn't solve the method-explosion problem. Suggesting it does actually hides the obvious solution to the problem because to properly implement your role you need to create an ORM delegate anyway. The proper solution to this in Moose terms is:
Where Persistent is a parameterized role applied to the metaclass, and SomeORM is a parameter to define what storage engine to use. Effectively your Class's instance has-a ORM and that ORM is used to persist the attributes you care about.
To be more blunt, dami is correct ... the relationship between between SomeORM and Server is 'has' not 'does' or 'is'. Your use of roles there doesn't change that fact it simply hides the implementation you're complaining about somewhere useful for the sake of your argument.
Reply to This