All those other uses for attributes are useful and interesting, but I thought we were talking about method decoration?
Decorators as code rather than syntax also allow you to decorate someone else's methods, or to compose some advice into some class through roles, even at runtime. This is not possible with attributes.
In reply to Re^3: RFC: Simulating Python's @decorators in Perl with Attributes
by pokki
in thread RFC: Simulating Python's @decorators in Perl with Attributes
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |