package Util::Stuff::abc; sub attrib1 { 1 } sub attrib2 { 10 } ... eval { $symref->attrib1; }; if (!$@) { ... $symref->attrib1 is OK ... }