On Fri, 02 May 2008 18:33:07 +0200 Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
> 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. Yes, but without it I could not figure out how to achieve it. I think it is very complicated comparing to C, C++. The more language I learn, the more I think C(++) is the most flexible language. Thanks, Levente -- Levente Kovacs <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/