in reply to Re^5: exiting a subroutine neatly (Throwable)
in thread exiting a subroutine neatly
How do you figure?
Looking at your code:
sub foo { ... try { fooFoo($ssh); } catch { warn "warn cought one: $_"; }; $ssh->exit_session; $ssh->close_session; }
What I mean is that you should let your exceptions go uncaught for upper levels where they can be handled properly. There is no reason to couple the exception catching with the cleanup code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: exiting a subroutine neatly (Throwable)
by Anonymous Monk on May 05, 2015 at 16:43 UTC |