Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: suggested module/tools to automatically "tighten" my perl

by snoopy (Deacon)
on Jun 22, 2012 at 01:13 UTC ( #977741=note: print w/ replies, xml ) Need Help??


in reply to suggested module/tools to automatically "tighten" my perl

Is lazy loading an option?

I.E. can you replace global use and require statements with a lazy loader such as autouse or Class::Autouse.

Alternatively, can you require modules just in time?

# conditional use of require if ($heavy_lifting_needed) { require BigModule; ## BigModule->import(); # maybe BigModule->do_stuff(); }
This could be of benefit:
  • if your code is organised into discrete modules
  • only some of them are being used in any particular hit
  • you're not importing symbols into your namespace


Comment on Re: suggested module/tools to automatically "tighten" my perl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977741]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2015-07-04 17:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls