mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-06 06:21:16 +08:00
handle cmdline option errors as soon as possible
This commit is contained in:
parent
7823ea6054
commit
e324a39b04
@ -169,6 +169,11 @@ GetOptions(\%options,
|
|||||||
'help',
|
'help',
|
||||||
'dump') or die($usage);
|
'dump') or die($usage);
|
||||||
|
|
||||||
|
if( defined $options{help} )
|
||||||
|
{
|
||||||
|
die($usage);
|
||||||
|
}
|
||||||
|
|
||||||
# set up plotting style
|
# set up plotting style
|
||||||
my $style = '';
|
my $style = '';
|
||||||
if($options{lines}) { $style .= 'lines';}
|
if($options{lines}) { $style .= 'lines';}
|
||||||
@ -176,12 +181,6 @@ if($options{points}) { $style .= 'points';}
|
|||||||
|
|
||||||
if(!$style) { $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
|
# 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
|
# one curve. The first 'point' is a hash describing various curve parameters. The rest are all
|
||||||
# references to lists of (x,y) tuples
|
# references to lists of (x,y) tuples
|
||||||
|
Loading…
Reference in New Issue
Block a user