Replacement for attrs.pm that sets or gets the attributes of subroutines. Attributes are set at compile time. If an attribute is unrecognized, it will result in a fatal error. While the error is trappable, it will stop the compilation within an eval. You must be careful about naming your attributes; an attribute that's all lowercase and not a built-in attribute will result in a warning (unless you use warnings "reserved"). An example of attributes is:
sub foo : method ; use attributes ( ); # Optional, to get subroutine declarations my @attrlist = attributes::get(\&foo);
The built-in attributes are:
There are no built-in attributes for anything other than subroutines.
Copyright © 2002 O'Reilly & Associates. All rights reserved.