Robert - that's along the lines of what I'm after. My nuance is that I might have several different configurations for the server - since there are several different containers that have different PerlSetVar directives.
In my example below a call to "/test" is going to have a different config to a call to "/different" or a call to "/". How can I do three different intializations for these different configurations and then keep track of them for the remaining requests? Jay ----- Original Message ----- From: "Robert Landrum" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 01, 2002 5:02 PM Subject: Re: Indentifying dir_config's > At 1:39 PM -0800 2/1/02, [EMAIL PROTECTED] wrote: > >I'm wondering if there is a way that I can mark or remeber that > >I've seen a particular dir_config during a previous request. The > >motivation is performance related - so that I can set up for > >particular set of "PerlSetVar" values only the once. Then > >subseqeuent requests to that child will use a previously > >determined value (instanciated object). > > > >IE: in my httpd.conf I have - > > > >PerlSetVar myvalue 100 > > > ><Location "/test"> > > PerlSetVar myvalue 200 > ></Location> > > > ><Location "/different"> > > PerlSetVar myvalue 300 > ></Location> > > > >So - request 1 - GET /test > > I check dir_config("myvalue") and setup. > > Can I mark that I was here; sorta like the equivalent of > > <Location "/test"> > > PerlSetVar myvalue 200 > > PerlSetVar signature myvalue_200 > > </Location> > > > > I'm not sure if I understand... > > I've done something in one of my modues in the past... > > package MyHandler; > > our $INITED = 0; > > our %CONFIG = (); > > sub handler { > .... > unless($INITED) { > %CONFIG = $self->get_config($r); > $INITED = 1; > } > .... > } > > > That way I only have to get_config once per forked process... This > is very useful for static (or near static) data. In this example > get_config was pulling configuration directives from an Oracle > database. > > Rob > > > > > -- > When I used a Mac, they laughed because I had no command prompt. When > I used Linux, they laughed because I had no GUI. >