|Subject:||Should exit with non-zero status on errors|
|Date:||Tue, 10 Apr 2007 11:26:11 +1200|
|To:||bug-getopt-euclid [...] rt.cpan.org|
|From:||Toby Allsopp <Toby.Allsopp [...] navman.com>|
If an error occurs when parsing the command line, e.g. an unknown option or a missing required one, the program should exit with a non-zero status so that the invoking process knows that something has gone wrong. It is traditional to use an exit status of 2 for this case. It is also traditional to use an exit status of 1 when only usage information has been displayed (e.g. in response to --help, --usage or --version) so that it is clear that no useful work has been done. See the DESCRIPTION section of Pod::Usage for corroboration.