in reply to Re^4: Using Exporter module
in thread Using Exporter module
Another way would be to check caller.
I didn't say it was impossible, just that Perl didn't support it. Your way requires rewritting all the calls to the function. Using caller requires knowing the name of all the functions that will call each private function. That's ugly, fragile and best avoided. In fact, I judged best not even mentioning them.
By the way, both ways can be circumvented (with difficulty).
|
|---|