handle cmdline option errors as soon as possible

This commit is contained in:
Dima Kogan 2011-01-03 12:08:34 -08:00 committed by Dima Kogan
parent 7823ea6054
commit e324a39b04

View File

@ -169,6 +169,11 @@ GetOptions(\%options,
'help',
'dump') or die($usage);
if( defined $options{help} )
{
die($usage);
}
# set up plotting style
my $style = '';
if($options{lines}) { $style .= 'lines';}
@ -176,12 +181,6 @@ if($options{points}) { $style .= 'points';}
if(!$style) { $style = 'points'; }
if( defined $options{help} )
{
die($usage);
}
# list containing the plot data. Each element is a reference to a list, representing the data for
# one curve. The first 'point' is a hash describing various curve parameters. The rest are all
# references to lists of (x,y) tuples