| 1 | #!/usr/bin/env perl | ||
| 2 | =head1 NAME | ||
| 3 | |||
| 4 | nodie.pl - runs command again when its dead | ||
| 5 | |||
| 6 | =head1 VERSION | ||
| 7 | |||
| 8 | version 1.02 | ||
| 9 | |||
| 10 | =head1 SYNOPSIS | ||
| 11 | |||
| 12 | =over | ||
| 13 | |||
| 14 | B<nodie.pl> [ -e|--exitcodes=0,2 ] [ -l|--log='&STDERR' ] command arg1 arg2 ... | ||
| 15 | |||
| 16 | B<nodie.pl> -h|--help | ||
| 17 | |||
| 18 | =back | ||
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | B<nodie.pl> is a part of App::nodie package that runs command again when its dead. | ||
| 23 | |||
| 24 | =head2 Arguments | ||
| 25 | |||
| 26 | =head3 --exitcodes | ||
| 27 | |||
| 28 | B<--exitcodes> or B<-e> specifies that expected exit codes for graceful termination of command in comma separated string. | ||
| 29 | By default '0,2'. | ||
| 30 | |||
| 31 | =head3 --log | ||
| 32 | |||
| 33 | B<--log> or B<-l> enables printing logs and specifies log file name/descriptor. | ||
| 34 | If log file name/descriptor isn't specified in argument, default is '&STDERR'. | ||
| 35 | '-' is synonym with '&STDOUT'. File descriptors must start with '&', eg '&2'. | ||
| 36 | |||
| 37 | =cut | ||
| 38 | use strict; | ||
| 39 | use warnings; | ||
| 40 | use v5.10.1; | ||
| 41 | |||
| 42 | use App::nodie; | ||
| 43 | |||
| 44 | |||
| 45 | BEGIN { | ||
| 46 | our $VERSION = '1.02'; | ||
| 47 | } | ||
| 48 | |||
| 49 | |||
| 50 | run; | ||
| 51 | __END__ |