in reply to Re: Re: Re: Improving memory performance
in thread Improving memory performance

So if I use a same module a multiple time in a script ( ie main calls module A, module A calls B and C but C also calls B and A ) the only memory I waste is by exporting the subs in each namespace ?
  • Comment on Re: Re: Re: Re: Improving memory performance

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Improving memory performance
by perrin (Chancellor) on Oct 04, 2002 at 17:08 UTC
    That's correct. The module is only compiled once, but the imports happen in each namespace where the script is used, and they take up space. You can always simply avoid importing by calling a module with an empty import list, like this:
    use Foo::Bar ();