package X; use strict; use Attribute::Handlers; sub a : ATTR(SCALAR) { print "a\n"; } sub b { print "b\n"; } package main; X::a; X::b;