> Hi there,
> 
> On Tue, 31 Oct 2000, Scott Alexander wrote:
> 
> > Is it possible using the magic of mod_perl to set a hash array
> > available for all scripts without each script having to open the dbm
> > file.
> 
> It's not really a mod_perl specific problem.  You need to take care of
> the possibility that there will be conflicts between processes trying
> to write to the same file, so you need to implement some sort of
> locking.  It's in the Guide <http://perl.apache.org/guide>.

I'm using the hash to store different output languages and is only 
ever updated by one person. 100% of the time it's being read.

>  
> > In some of my scripts I'm using functions recursively. Passing
> > %output to a function will work once put when it goes very deep
> > recursively it doesn't work.
> 
> Pass a reference.
> 
> my $rhash = \%output;
> my $result = func( $rhash );

Okay this solves my problem that I had.

> 
> $rhash _could_ be a global, but don't go there...



Is it in anyway possible to tie the hash once to a dbm file?

At the moment it is tied every time a script is called. 

Does the line $test = dbmopen(%output, "/my.dbm", 0600) ; on 
every script cause much work?

Scott

> 
> 73,
> Ged.


Reply via email to