Make it scoped (so you can catch it outside of the intended code block),
and I think this is a reasonable solution.
Brian
----
Brian T. Wightman - Global Data Management
[EMAIL PROTECTED]
414-524-4025
|---------+---------------------------->
| | [EMAIL PROTECTED]|
| | |
| | 12/15/2003 05:51 |
| | AM |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: [cgiapp] Eliminate unnecesary warnings about Replacing previous
run-mode |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
Recently someone asked what to do with the
Warnings about "Replacing previous run-mode".
I recently encountered this problem so I added the following
code to my cgiapp_prerun subroutine.
(local won't work here as the warning is in the run method of C::A)
$SIG{__WARN__} = sub {
if ($_[0] !~ /Replacing previous run-mode/) {
warn $_[0];
}
}; # silence the unnecessary warning about changing run_mode
Enjoy or let me know what is the flaw in this.
Gabor
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]