Hi there,
I am using Try::Tiny for catching dies in my script. But I've some problems to return from the sub the try..catch - block is in.
Here's some sample:
use Try::Tiny; sub foo { try { die; } catch { print 'error'; return; }; print 'no_err'; } foo;
This code outputs: "errorno_err". So as you can see it does not return from the sub itself, only from the catch block.
Anybody has an idea how to get the desired behavior?
Thank you for help!
In reply to Try::Tiny - return in catch from sub by err
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |