Hi, I'm writing a filter using modperl-2.0, and trying to figure out how to get per-directory configuration information passed into it. I've tried both PerlSetVar and PerlSetEnv, but nothing seems to be getting through. Below is a section of the httpd.conf and the code.
The attempt to reference dir_config gives: Can't locate object method "dir_config" via package "Apache::Filter" (perhaps you forgot to load "Apache::Filter"?) at {path}/RewriteLinks.pm line 117. The environment variable has no value. Thanks for any help you can provide. <Location /filtered> PerlOutputFilterHandler RewriteLinks PerlOptions +SetupEnv PerlSetVar CurrentDirectory /foobie PerlSetEnv SomeVar SomeValue </Location> sub handler { my $filter = shift; # $filter->print("<!-- current directory: " . $filter->dir_config->get("CurrentDirectory") . " --\ >\n"); $filter->print("<!-- SomeVar is " . $ENV{'SomeVar'} . "-->\n"); }