[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    RE: Deleting a PerlSetVar variable
From:       "Stathy G. Touloumis" <stathy.touloumis () edventions ! com>
Date:       2002-02-26 19:28:12
[Download RAW message or body]

See chapter 8 of the Eagle book (Apache Modules in Perl/C) for complete
coverage of hooking into the apache configuration.  It really allows you to
do some pretty nifty stuff and would easily allow you to perform what you
want.  At first it seems overkill to know but once you do it opens many
doors for configuring and maintaining your apps IMHO.

There will be some code changes for accessing your configuration directives
but not anything more complex than accessing via PerlSetVar.

> What you have suggested can solve the problem... i'm however, preferably
> looking at deleting a set var via my apache config file, and don't have
> a '$r' /request_object available there.
>
> Doug et al, can i please suggest the addition of a:
>
>   * PerlDelVar or PerlUnsetVar
>
> to delete/unset a variable in the apache config file.
> I would make the changes and send in a patch, but i don't under the code
> (with my limited knowledge of C) well enough to do that.
>
> cheers,
>
> simran.
>
>
> On Tue, 2002-02-26 at 00:03, Geoffrey Young wrote:
> > simran wrote:
> > >
> > > Hi All,
> > >
> > > I could not find references on how to delete a varaible once set via
> > > PerlSetVar.
> > >
> > > I am setting a global 'PerlSetVar AuthNameExpires +24h' variable in my
> > > httpd.conf and want to be able to set it back to "expire at end of
> > > session" for some virtual hosts.
> > >
> > > If i could delete that variable, i could achieve that as per the spec,
> > > if the browser is not given a expiry time, the cookies lasts only for
> > > the session, however i so far have not been able to figure out how to
> > > delete a variable once set - anyone... ???
> > >
> >
> > you can use the Apache::Table interface for deleting (or setting or
> > manipulating) PerlSetVar
> >
> > $r->dir_config->unset('AuthNameExpires');
> >
> > see the latter part of recipe 3.14 in the cookbook for some additional
> > details on using the Apache::Table interface for dir_config, as well
> > as the Apache::Table manpage...
> >
> > HTH
> >
> > --Geoff
> >
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic