Should not be used in production code, but instead as aid in diagnosing warnings that don't get produced in off-line testing.
{ my @warns; BEGIN { $SIG{__WARN__}= sub { push @warns, $_[0]; } } END { if( @warns ) { print "\n<html><p>Warnings:<pre>\n", @warns, "</pre></p></html>\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: warningsToBrowser
by tye (Sage) on Sep 29, 2001 at 10:38 UTC |