in reply to Capturing warnings from DBD:PG
I thought it was Perl warnings but that code doesn’t fireThat's because of order of operations. local $SIG{__WARN__} = sub {... is a command that executes to modify the warnings handler until you exit the current scope. But if you look at your script, it doesn't get called until immediately before you exit. Try moving that code to before the command that issues the warning.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Capturing warnings from DBD:PG
by HeadScratcher (Novice) on Nov 26, 2015 at 10:21 UTC |