sub foo { } my($class, $invoke) = qw/ main foo /; print "$class can $invoke" if UNIVERSAL::can($class, $invoke); __output__ yup