develooper Front page | perl.beginners | Postings from May 2008

Re: perl module?

Thread Previous | Thread Next
From:
Gunnar Hjalmarsson
Date:
May 2, 2008 09:33
Subject:
Re: perl module?
Levente Kovacs wrote:
> J. Peng wrote:
>> On Fri, May 2, 2008 at 2:54 PM, Levente Kovacs <leventelist@gmail.com> 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

Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About