use strict; package LoudDecl; use Attribute::Handlers; use attributes; sub FETCH_CODE_ATTRIBUTES { qw(Loud) } sub Loud :ATTR { print "NOISE!\n"; } sub foo: Loud method { print 1; } print "Attributes: "; print join ', ', attributes::get(\&foo); print "\n"; __END__ NOISE! Attributes: method, Loud