On Mon, 5 Jul 2004, Matthew Darwin wrote: > I can't figure out what I'm doing wrong. I'm trying to pass a value > from httpd.conf to the module.... I know this used to work in mp1, but > I can't seem to get it to work in mp2.... > > Ideas? > > Thanks. > > httpd.conf > ---------- > > PerlModule Apache::Foo > <Location /nm/foo> > SetHandler perl-script > PerlResponseHandler Apache::Foo > PerlSetVar FooValue FooBarBaz > </Location> > > > Apache/Foo.pm > ------------- > > package Apache::Foo; > > use Apache::Const -compile => ':common'; > use Apache::ServerUtil (); > > sub handler { > my ($r) = @_; > > warn "Value of Foo is 1: ", $r->server->dir_config ("FooValue"), "\n"; > warn "Value of Foo is 2: ", $r->dir_config ("FooValue"), "\n"; > > return Apache::DECLINED; > }
If it's just to see if the values are being accessed OK, how about the following: ======================================================= package Apache::Foo; use Apache::Const -compile => ':common'; use Apache::RequestUtil (); sub handler { my ($r) = @_; $r->log->warn("Value of Foo is: " . $r->dir_config ("FooValue") . "\n"); return Apache::OK; } 1; ================================================================== -- best regards, randy kobes -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html