>> >> I mean anything relative to the performance.is the begin block called >> everytime orjust the first time and is it safe to define a function in >> a file and call it with this method rather than a package , > >The begin blocks are only run at compile time, so won't affect the >performance of future requests. >
If you require those scripts from more than one main-script under mod_perl,then it should affect the performance. Because each main-script load those scripts independently,then there are multi-copies of those scripts in each apache's process space,it distinctly waste the memory. It's good to define the scripts needed to be loaded as classes and access their methods by OO way. -- Books below translated by me to Chinese. Practical mod_perl: http://home.earthlink.net/~pangj/mod_perl/ Squid the Definitive Guide: http://home.earthlink.net/~pangj/squid/