actually I also had rather delegation in mind when answering this question.
As far as I understood does Role::Tiny -> apply_roles_to_object() actually create a new anonymous package and is reblessing the object. °
IMHO delegation sounds like a better approach, unless the performance penalty of the extra forwarding sub matters.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
°) quote "Object is reblessed into the resulting class."
In reply to Re^2: Role::Tiny: When to use apply_roles_to_object?
by LanX
in thread Role::Tiny: When to use apply_roles_to_object?
by karlgoethebier
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |