use attributes (); my ($x,@y,%z); attributes::->import(__PACKAGE__, \$x, 'Bent'); attributes::->import(__PACKAGE__, \@y, 'Bent'); attributes::->import(__PACKAGE__, \%z, 'Bent'); ($x,@y,%z) = 1;