Doug MacEachern wrote:
> thanks, i've applied a variation of your patch to cvs and will be in 1.27
> if anybody wants to work up a similar patch for Apache::PerlRun, that'd be
> nice too.
>
this seems to work ok as PerlRun and RegistryNG.
--Geoff
--- lib/Apache/PerlRun.pm 25 Mar 2002 01:59:02 -0000 1.38
+++ lib/Apache/PerlRun.pm 28 May 2002 14:38:03 -0000
@@ -28,6 +28,12 @@
return bless {r=>$r}, $class;
}
+sub xlog_error {
+ my($r, $msg) = @_;
+ $r->log_error($msg);
+ $r->notes('error-notes', $msg);
+}
+
sub can_compile {
my($pr) = @_;
my $r = $pr->{r};
@@ -52,7 +58,7 @@
$pr->{'mtime'} = -M _;
return wantarray ? (OK, $pr->{'mtime'}) : OK;
}
- $r->log_error("$filename not found or unable to stat");
+ xlog_error($r, "$filename not found or unable to stat");
return NOT_FOUND;
}
@@ -139,7 +145,7 @@
}
if($errsv) {
- $r->log_error($errsv);
+ xlog_error($r, $errsv);
return SERVER_ERROR;
}
@@ -211,6 +217,7 @@
my $pr = shift;
if ($@ and substr($@,0,4) ne " at ") {
$pr->{r}->log_error("PerlRun: `$@'");
+ $pr->{r}->notes('error-notes', $@);
$@{$pr->{r}->uri} = $@;
$@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
return SERVER_ERROR;