use constant SELF => 0; use constant VALUE=> 1; sub setx{ $_[SELF]->{_x} = $_[VALUE]; }