ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> modperl
modperl
Re: $r->dir_config->(un)set issue...
by Geoffrey Young other posts by this author
Aug 1 2002 2:35PM messages near this date
okay, I give, I'm stumped | Re: $r->dir_config->(un)set issue...
>  
>  The following pices of code do not work:
>  
>  -----------------------------------------------------
>  code sample 1
>  --------------
>  
>  1.  sub handler {
>  2.    my $r = instance Apache::Request(shift);
>  3. 
>  4.    $r->dir_config(MyVar => undef);
>  5.   
>  6.    $r->dir_config->unset("MyVar");
>  7.
>  8.    $r->dir_config->set(MyVar => undef);
>  9.
>  10. }
>    
>  
>  None of lines 4, 6 or 8 actually unset the variable. 


did you try $r-> server->dir_config->unset("MyVar") as well?

the dir_config table is a bit strange, since it merges per-server and 
per-directory configurations at runtime - from what I remember when 
playing with this last time, if you remove it from the per-dir config 
but you set it on a per-server config (which sounds like what you are 
doing) it will be perpetually re-populated on access to the per-dir 
config.  so, you may need to wipe both dir_config tables clean in 
order to really unset the variable from your handler.

HTH

--Geoff
Thread:
Greg Rumple
Geoffrey Young
Stas Bekman
Stas Bekman
simran
Geoffrey Young
simran
simran
Kyle Dawkins
Greg Rumple
Drew Taylor
Greg Rumple
David Kaufman
Greg Rumple

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved