The behaviour is consistantly wrong at least...
[Tue Jul 06 18:38:36 2004] [notice] Apache/2.0.49 (Unix) mod_perl/1.99_14 Perl/v5.8.3 DAV/2 configured -- resuming normal operations
[Tue Jul 6 18:38:42 2004] -e: Authd: Opening connection
[Tue Jul 6 18:38:42 2004] -e: Use of uninitialized value in concatenation (.) or string at /kinnetics/component/perllib/site_perl/Apache/Foo.pm line 7, <GEN0> line 2.
[Tue Jul 06 18:38:42 2004] [warn] [client 10.2.210.1] Value of Foo is: \n
Randy Kobes wrote:
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; ==================================================================
-- Matthew Darwin [EMAIL PROTECTED] http://www.mdarwin.ca
-- 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