Levente Kovacs wrote:
J. Peng wrote:
On Fri, May 2, 2008 at 2:54 PM, Levente Kovacs <[EMAIL PROTECTED]> wrote:
 I'd like to write a code shared among several simple scripts, as a NON-OO
 module, ...

<snip>

#########################
# the third way
#########################
Both the first way and the second way are not good.Because your config
file is large,the former ways have imported all those large content
into your main script.If your main script is run under cgi/modperl
which is generally multi-process,your memory could be eated quickly.So
the best way is to create an object then multi-process can share the
object if this object was not changed later,since object is only
located in its own namespace.

Thanks for your answer, approach #3 works good. That is what I wanted.

A slightly surprising response, considering that you in the original post said that you would like to write a non-OO module.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to