http://www.perlmonks.org?node_id=304597


in reply to When -w and use strict aren't enough...

I know not all the intricacies of Perl but I will
suggest this:

Snarf in your script from another script. The second
script will declare any sub it comes across:

if( $line =~ m!sub\s+(\S+){ eval "sub $1 {}" }
Then the second script will store every sub called
in an array, it will check %main:: and CORE:: to see
whether the subroutines have been, or will be, declared
at any point in your original script.

I hope my advice helps.
-Jacob
Eat Perl, live well.
My site