- or download this
PackageName->can('sub_name');
- or download this
$PAGE = "test_function_a";
eval "$PAGE" if main->can($PAGE);
- or download this
my %dispatch = (
'test_function_a' => \&test_function_a,
...
die "Package main doesn't seem able to '$func'" unless main->can($f
+unc);
$dispatch{$func}->();
}