perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Allen <ch...@cjx.com>
Subject Re: sharing data across SSI's (Executes)
Date Thu, 04 Sep 2003 00:38:23 GMT
On Wed, Sep 03, 2003 at 09:41:02AM +1000, Andrew O'Brien wrote:
> 
> 
> Need 2: A request-specific global variable: store in $req. eg $req->{key} = $value
> 

Is it reasonable to define a global by giving it its own package? - eg:

$mywebsite::cache={};

$mywebsite::cache->{product_1}=$product_object;


Under mod_perl, this [apparently] creates a global variable that
lasts for the lifetime of the apache child - ideal for fast
caching of unchanging database objects.

..or am I looking for trouble and should be using $req->{something}...???





---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message