From 788ae188dc9c8f8de4a20e1fdcc401f5b15b0890 Mon Sep 17 00:00:00 2001 From: J Pipkin Date: Sat, 8 Sep 2012 14:31:40 -0500 Subject: sbosnap converted to Getopt::Long --- sbosnap | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sbosnap b/sbosnap index b3e0dff..df380cf 100755 --- a/sbosnap +++ b/sbosnap @@ -15,7 +15,7 @@ use strict; use warnings FATAL => 'all'; use SBO::Lib; use File::Basename; -use Getopt::Std; +use Getopt::Long; my $sbo_home = $config{SBO_HOME}; my $self = basename ($0); @@ -38,11 +38,12 @@ EOF show_usage and exit 1 unless exists $ARGV[0]; -my %options; -getopts ('hv', \%options); +my ($help, $vers); -show_usage and exit 0 if exists $options{h}; -show_version and exit 0 if exists $options{v}; +GetOptions ('help|h' => \$help, 'version|v' => \$version); + +show_usage and exit 0 if $help; +show_version and exit 0 if $version; # check for a command and, if found, execute it my $command; -- cgit v1.2.3