perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject RE:require -- Mason vs embperl
Date Wed, 19 Dec 2001 21:55:15 GMT
At 2:26 PM -0500 12/19/01, Lihn, Horng-Twu wrote:
>Kee,
>This helps. But if I have to do this in very page,
>isn't this post a serious problem to the memory consumption?

I can't speak to "require".  But if you do a "use" in an Embperl 
script, the library will load once per-process.  In fact this 
occasionally causes problems for me, since I'm doing virtual hosting 
and sometimes I have moved one site to a new library, but haven't 
recoded the other--can't do that if the two servers are reusing 
common Apache processes.

That said, it would be nice (just from an easy-of-use point of few) 
if Embperl had an option to load a common library for all of your 
Embperl files on a site--but you could easily do that using 
EmbperlObject.  Just define a template something like this:

[! use MyLibrary; !]
[- Execute('*') -]

Now all of your files have access to MyLibrary.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com (or ...!alice!nazgul for time travelers :-)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

Mime
View raw message