sstevens has asked for the wisdom of the Perl Monks concerning the following question:
Where does $s come from? I've looked into handlers, thinking that was the solution, but I can't get anything to work. Aaaahh! Any help would really be appreciated. Thanks!use Apache2::ServerRec (); $timeout = $s->timeout();
And in httpd.conf:#!/opt/local/bin/perl package MyApache2::Timeout; use strict; use warnings; use CGI::Carp qw{fatalsToBrowser}; use Apache2::ServerRec(); use Apache2::Const -compile => qw{OK}; sub handler { my $r = shift; $r->content_type('text/plain'); my $timeout = $r->timeout(); return Apache2::Const::OK; } 1;
When I go to http://localhost/timeout, I get an internal server error (no details like I would expect from using CGI::Carp). I know that MyApache2::Timeout is being loaded because if I comment out the my $timeout = $r->timeout(); line and restart Apache, I get no error.PerlModule MyApache2::Timeout <Location /timeout> SetHandler modperl PerlResponseHandler MyApache2::Timeout </Location>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache2::ServerRec Cluelessness
by redhotpenguin (Deacon) on Jan 26, 2008 at 18:47 UTC | |
by sstevens (Scribe) on Jan 26, 2008 at 19:35 UTC | |
by redhotpenguin (Deacon) on Jan 27, 2008 at 01:44 UTC | |
by Anonymous Monk on Dec 11, 2014 at 11:43 UTC |