in reply to Flexibility in Module for Import or Execute
You could check if $0 matches __FILE__, but $0 is not a read-only variable, so it's possible that some module you've used has changed it.
Or you could use the core Perl function designed for this kind of thing... caller.
|
|---|