On 5/6/07, James. L <[EMAIL PROTECTED]> wrote:
my question is
once the app produce the html, does the memory
allocated by the parsed data get released to perl?
that memory will be reused by other mod_perl app?

No, Perl doesn't work that way.  It will keep that memory allocated
for that variable unless you undef the variable explicitly.

in the config module example from mod_perl doc, it
says that declaring a global hash which consists the
configs is better than declaring few global variables.
why is that? i thought that they takes the same amount
of memory..

Without seeing the documentation you're referring to, we can only
guess why it says that.  It wouldn't be to save memory.  Maybe it's to
avoid namespace pollution or to make importing easy.

is it approriate to preload all modules used in my app
in startup.pl so that it won't be loaded in each
apache chile process?

Yes.

if module A.pm uses B.pm, does preloading A also
preload B as well?

Yes.

does the object method way(create the object at app's
start up and cache it for later use) have less
overhead than class method?

Neither one has significant overhead.

- Perrin

Reply via email to