This works, sort of. It also brings in @ISA and any overloaded ->can(...) methods so you might find that __PACKAGE__->can( 'test' ) is true even if the current package doesn't have a &test function. You should have said defined &test which is the documented and backwards compatible way to test for this.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re^2: how to find a subroutine exists or not
by diotalevi
in thread how to find a subroutine exists or not
by kingofking
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |