short and long help options
[barcat.git] / graph
diff --git a/graph b/graph
index 16af69ab31f609d651c5bd38f3121dcde019a429..f9d18a9526881f38e63883a93252f737a84e14c2 100755 (executable)
--- a/graph
+++ b/graph
@@ -6,8 +6,11 @@ use List::Util qw( max sum );
 our $VERSION = '1.00';
 
 use Getopt::Long '2.33';
+sub podexit { require Pod::Usage; Pod::Usage::pod2usage(-exitval => 0, @_) }
 GetOptions(\my %opt,
        'width|w=i',
+       'usage|h' => sub { podexit() },
+       'help'    => sub { podexit(-verbose => 2) },
 ) or exit 64;  # EX_USAGE
 $opt{width} ||= $ENV{COLUMNS} || 80;