in reply to Re: RFC: Simulating Python's @decorators in Perl with Attributes
in thread RFC: Simulating Python's @decorators in Perl with Attributes
In O'Reilly's Perl Hacks you'll find a similar issue with an attribute Doc for docstrings living in UNIVERSAL.
Maybe we just need a module to safely add features to UNIVERSAL and warn about conflicts.
> my %capital : Hash::Sorted;
> would be too cumbersome.
really?
Maybe just leave it to the user. An import-option could specify the namespace.
I wouldn't mind having different modules collecting their attributes into X:: like "eXtension".
Why not X::Sorted or X::Doc ... or _::Sorted or _::Doc? :)
BTW: Happy to find other's trying to use syntactic sugar to extend the language! =)
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|