in reply to Checking more than just the current namespace for sub and var definitions

A common solution is to first move subs with no or little dependencies to a module, and then use that module both from the main script and from the other modules you are going to create.

The solution for variables is to rely less on implicitly shared state, but rather pass that information as arguments to the subroutines, or encapsulate it into objects.

Perl 6 - links to (nearly) everything that is Perl 6.
  • Comment on Re: Checking more than just the current namespace for sub and var definitions