use strict; use warnings; #here's where you set up your attribute handlers use Monks::AttributeDispatcher Loud => sub { print "NOISY\n"; } , Boom => sub { print "BOOM\n"; } ; #here's where you show off your handlers sub foo: Loud method { print 1; } sub bar : Loud Boom method { print "pling.\n"; } print "Attributes: "; print join ', ', attributes::get(\&bar); print "\n";