in reply to checking from a module if a sub exists in main::
In addition to dragonchild's response, you can use caller to determine the calling namespace:
my $calling_namespace = caller(0);
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|