S
Stumo
Hi
I'm trying to write my own function that works like use but outputs a
more user friendly error message if the module isn't present.
My current tactic is to have my function in it's own package, and it
uses File:ackage to do the loading - however this doesn't import
things into the correct namespace (neither does calling import()
directly for some packages that have redefined it).
Is there any way I can change what caller() returns, so my function
does not appear and everything behaves as if it was called from the
namespace that called my function?
Alternatively, are there any other solutions?
Stuart Moore
I'm trying to write my own function that works like use but outputs a
more user friendly error message if the module isn't present.
My current tactic is to have my function in it's own package, and it
uses File:ackage to do the loading - however this doesn't import
things into the correct namespace (neither does calling import()
directly for some packages that have redefined it).
Is there any way I can change what caller() returns, so my function
does not appear and everything behaves as if it was called from the
namespace that called my function?
Alternatively, are there any other solutions?
Stuart Moore