attrs

Sets or gets the attributes of subroutines. Attributes are set for a subroutine at compile time; therefore, setting an invalid attribute results in a compile-time error. During execution, when you call attrs::get on a subroutine reference or name, it returns the list of attributes that are set. Note that attrs::get is not exported. For example:

sub test {
 use attrs qw(locked method); ...
}
@a = attrs::get(\foo);


The valid attributes are: