in reply to Re: Role::Tiny: When to use apply_roles_to_object?
in thread Role::Tiny: When to use apply_roles_to_object?
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."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Role::Tiny: When to use apply_roles_to_object?
by tobyink (Canon) on May 04, 2019 at 07:39 UTC | |
by LanX (Saint) on May 04, 2019 at 16:36 UTC | |
|
Re^3: Role::Tiny: When to use apply_roles_to_object?
by 1nickt (Canon) on May 03, 2019 at 18:42 UTC |