artemave has asked for the wisdom of the Perl Monks concerning the following question:
Now the special error handler:sub handler : method { my ($self, $r) = @_; ... $self->{r}->pnotes(error => 'Darn'); return Apache2::Const::SERVER_ERROR; } ... 1;
And finally httpd.conf part to connect it all:sub handler { my $r = shift; $r->content_type('text/html'); $r->print($r->pnotes("error")); return Apache2::Const::OK; } 1;
The problem is that pnotes('error') does not keep its value when redirected to error handler (i tried to redirect explicitly using headers_out->set(Location => ...) and Apache2::Const::REDIRECT but the result was the same).... ErrorDocument 500 /error ... PerlModule dir_browse::error <Location /error> SetHandler perl-script PerlResponseHandler dir_browse::error </Location>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache2. Passing data between handlers
by gryphon (Abbot) on Apr 25, 2007 at 00:24 UTC | |
by artemave (Beadle) on Apr 25, 2007 at 16:21 UTC |