in reply to Re: Re: Catching perl warnings and errors
in thread Catching perl warnings and errors
There are many ways to catch exceptions. You could use eval(), but using eval() will not work for warnings from the compiler, from the POD:
Or you can use Error as nite_man suggests, but I just made a couple of tests and read the docs and compiler warnings don't seem to be handled by it.Beware that using "eval" neither silences perl from printing warnings +to STDERR, nor does it stuff the text of warning messages into $@.
hope this helps,
|
---|