perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David J Radunz <david.rad...@staff.netspace.net.au>
Subject Re: Apache::PerlRun flooding error log
Date Wed, 06 Apr 2005 05:04:26 GMT
Well, all of these scripts run under PerlRun - so I either have to make
that change in every one of them, and every module they load. Like, if I
set the SIG{__WARN__} at the top of a script and a module set it,
wouldn't it then be 'reset' ?

David

On Wed, 2005-04-06 at 01:00 -0400, Stas Bekman wrote:
> Stas Bekman wrote:
> > David J Radunz wrote:
> > 
> >> Sounds great - yet obvious. I would have to do about 2 years worth of
> >> work to fix all of the bugs. I didn't create them either, I fix them in
> >> my own code - but we have so much code base. I wanted a mod_perl
> >> solution to overcome this issue by filtering the error.
> > 
> > 
> > If that's the case, why don't you adjust your %SIG wrappers to truncate 
> > the error length? It's relatively easy:
> > 
> > use Carp qw(confess cluck);
> > $SIG{__DIE__}  = sub { die  substr Carp::longmess(@_), 0, TRUNCATE };
> > $SIG{__WARN__} = sub { warn substr Carp::longmess(@_), 0, TRUNCATE };
> 
> Sorry, it should have been:
> 
> use constant TRUNCATE => 40;
> use Carp ();
> $SIG{__DIE__}  = sub { die  substr Carp::longmess(@_), 0, TRUNCATE };
> $SIG{__WARN__} = sub { warn substr Carp::longmess(@_), 0, TRUNCATE };
> 

This email and any files transmitted with it are confidential and intended solely for the

use of the individual or entity to whom they are addressed. Please notify the sender 
immediately by email if you have received this email by mistake and delete this email 
from your system. Please note that any views or opinions presented in this email are solely
 those of the author and do not necessarily represent those of the organisation. 
Finally, the recipient should check this email and any attachments for the presence of 
viruses. The organisation accepts no liability for any damage caused by any virus 
transmitted by this email. 


Mime
View raw message