use MyAttrMaker qw(myattr); sub somefunc :myattr { print "somefunc!\n"; } somefunc();