NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Oh, it's better than that.... (Score:1)
perl -MDevel::Size=total_size -le 'use POSIX; print total_size(\%::)'
728436
perl -MDevel::Size=total_size -le 'use POSIX(); print total_size(\%::)'
213560
You're not saving 300K, you're saving 500K...
Forking (Score:2)
So if you run mod_perl the old fashioned (and IMO still: better) way, consider loading all of POSIX upfront. This will improve runtime of the first script (per Apache child!) that needs something out of POSIX, and memory use, as you now load everything only once instead of parts duplicately.
As always: the way you use code is important for the way you should write it. A good rule of thumb is to always e