When developing non-trivial functions in isolation....you need to copy some
of the supporting scaffolding over from your main program to support it.
When you subsequently come to "load" the module into your main
program...there's a danger of duplicate scaffolding.
Is there some way to hide the copied scaffolding in your module along with
the module's main clause upon loading
or perhaps with the flick of a "switch".
I'm thinking of Python's `if __name__ == '__main__' and Perl's unless
(caller) {...}
Just wondering.

Reply via email to