hello, 

few beginner questions on using mod_perl.

1. memory usage. 

i have an app that reads/parses a file line by line
then passes the data to TT for html output. each http
request may request different files. 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?

2. global variable.

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..

3. preloading modules in startup.pl..

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? 

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

4. OO, class method vs object method?

for some module, i may create a instance first then
use it in all my app ( $obj->method ) . other modules,
i may access method by using it directly (
Foo::Bar->method ). 

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? i usually don't use object
method if i don't have data shared by other module
methods. 

thanks in advance,

James.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to