No such thing as a small change | |
PerlMonks |
Re^3: Call subroutine of main namespace from package in Plackby choroba (Cardinal) |
on Apr 11, 2018 at 15:25 UTC ( [id://1212696]=note: print w/replies, xml ) | Need Help?? |
I don't understand. A module doesn't know who calls it, it can't make any assumptions about its caller's namespace and capabilities. The contract is defined by arguments and the returned value. If you need a function called in the main program and in the modules, move it into a new module and properly use it everywhere.
In Section
Seekers of Perl Wisdom
|
|