Re: postgres insert
- From: info@xxxxxxxxxxxx (D. Bolliger)
- Date: Thu, 23 Nov 2006 20:32:13 +0100
Tom Allison am Donnerstag, 23. November 2006 16:13:
[snipped some code]
I get a STDERR warning printed out everytime this has a duplicate key
violation...
Any idea why eval{} doesn't suppress this?
Hi Tom
It'd be a bad idea... eval BLOCK adds the ability to catch runtime errors and
modify the default reaction to a die. It is not here to hide any problems of
code.
You can suppress the output of warnings at a certain place by f.ex:
#!/usr/bin/perl
use strict; use warnings;
warn "Test1\n";
{
local $SIG{__WARN__}=sub {}; # <<<<
warn "Test2\n";
}
warn "Test3\n";
__END__
output:
Test1
Test3
Dani [not part of the output...]
.
- Follow-Ups:
- Re: postgres insert
- From: Tom Allison
- Re: postgres insert
- References:
- postgres insert
- From: Tom Allison
- postgres insert
- Prev by Date: Re: Free PERL Editor
- Next by Date: Re: Free Perl Editor
- Previous by thread: Re: postgres insert
- Next by thread: Re: postgres insert
- Index(es):
Relevant Pages
|