See the current Perl documentation for lib:attrs.
Here is our local, out-dated (pre-5.6) version:

attrs - set/get attributes of a subroutine

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

This module lets you set and get attributes for subroutines. Setting
attributes takes place at compile time; trying to set invalid attribute
names causes a compile-time error. Calling
attr::get on a subroutine reference or name returns its list of attribute names.
Notice that attr::get is not exported. Valid attributes are as follows.
lock operator immediately after the subroutine is entered.