http://www.perlmonks.org?node_id=1006045


in reply to Fastcgi and persistence in sub modules

IMO, if your script only depends on the functionality provided by module A, then only load module A. If your script peeks behind the covers of Module A and loads Module B and Module C from within the script, you have now made your script dependent on modules A, B, and C, and not just A. If you change the implementation of module A to use modules D and E instead, you now have to maintain the script as well.

Only load what you explicitly depend on.

From a persistence standpoint, fastcgi will have the dependencies also loaded.

--MidLifeXis

  • Comment on Re: Fastcgi and persistence in sub modules