in reply to Re: why cann't $@ output the eval error in this case?
in thread why cann't $@ output the eval error in this case?

You are correct in believing that unless (eval {...}) { #error handling } should catch the exception

If the code ... returns a false value, the unless block is still executed even if no exception is thrown, in which case $@ doesn't meet your expectations at all. (I don't know the used modules enough to know if that can happen in this particular case).

To be on the safe side and only exeucte a block if an exception occors, I often write

unless (eval { ...; 1} ( { # exception handling code here }