As long as you are using a simple module with no inheritance, you could rely on can to do this:
if ( __PACKAGE__->can( 'sub_to_test' ) ) { ... }
In reply to Re: test for subroutine existence
by ehdonhon
in thread test for subroutine existence
by twerq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |