Re: RubyInitHandler Problems

Michael Granger <[email protected]> Wed, 4 Aug 2004 08:19:16 -0700
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
On Jul 29, 2004, at 3:20 AM, Hammond, Tony wrote:

> Thanks - that worked. But perhaps wasn't what I wanted. What I did 
> want was
> to persist a data structure (read in from an external file) across 
> multiple
> calls to a .rbx script. What would be the best way of doing that? 
> (Seems
> that RubyInitHandler is called at _each_ invocation of a .rbx script.)

What you're talking about, I suspect, is the equivalent of mod_perl's 
ChildInitHandler, which is run once when the Apache child instance 
first starts up. mod_ruby doesn't (yet) have such a hook.

I've had some success with putting initialization code in a spot that 
runs when the file is first required, but it'd be nice to have a 
ChildInitHandler, too. Would it be difficult to add, Shugo-san?

--
Michael Granger <[email protected]>
Rubymage, Believer, Architect
The FaerieMUD Consortium <http://www.FaerieMUD.org/>
12383406064495388618631689469409153107.to_s(36).tr('z',' ')