use attributes (); for (qw( xs_func1 xs_func2 )) { no strict 'refs'; attributes->import(__PACKAGE__, \&{$_}, 'lvalue'); }