in reply to Want END block to run except when usage()/--help invocation
One way would be to set a flag in your usage() func and then bracket the code in the end block with: unless( $flag ) { ... }
Another would be to use POSIX::_exit() which will bypass END blocks (and other other cleanup including DESTROY funcs).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Want END block to run except when usage()/--help invocation
by CoVAX (Beadle) on Feb 27, 2015 at 07:31 UTC | |
by Happy-the-monk (Canon) on Feb 27, 2015 at 07:44 UTC | |
by BrowserUk (Patriarch) on Feb 27, 2015 at 09:31 UTC | |
by Laurent_R (Canon) on Feb 27, 2015 at 07:52 UTC | |
by BrowserUk (Patriarch) on Feb 27, 2015 at 09:46 UTC |