in reply to How Are Attributes Useful?
I recall you have been studying the :lvalue attribute for subs. Reflect that that attribute is more than a tag that you may query at runtime like some kind of metadata. I'm not sure how I'd go about querying that.
When the :lvalue attribute is applied to a sub, it changes how the sub is compiled and what usage is permitted of it.
The description of attributes as tags to be queried sounds a lot like the "properties" Lisp can attach to a symbol. I think that's a mischaracterization.
A read of the Attribute::Handlers pod suggests that magic outside runtime is what attributes are for. Those docs give some non-trivial examples. I suspect that perldoc -m Attribute::Handlers will yield lots of wisdom on the matter, but I know for a fact it won't be easy ;-)
I'm sure that perl attributes would benefit from more of us experimenting with them.
After Compline,
Zaxo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How Are Attributes Useful?
by Limbic~Region (Chancellor) on Jan 19, 2005 at 00:58 UTC | |
by redlemon (Hermit) on Jan 19, 2005 at 22:27 UTC | |
Re^2: How Are Attributes Useful? (just tags)
by tye (Sage) on Jan 18, 2005 at 23:02 UTC | |
by Zaxo (Archbishop) on Jan 19, 2005 at 00:32 UTC | |
by tye (Sage) on Jan 19, 2005 at 01:57 UTC |