From 5123ca73d3eda279260b14420f56c4823e28700d Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 15 Oct 2016 20:14:33 -0700 Subject: [PATCH] minor simplification I delete the style and styleall options after I use them. This is defensive and clarifies the intent --- bin/feedgnuplot | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 940ae42..020707b 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -138,17 +138,13 @@ sub interpretCommandline # --curvestyleall, so fill that in if( $options{styleall} ) { - if($options{curvestyleall} ) - { - $options{curvestyleall} .= " $options{styleall}"; - } - else - { - $options{curvestyleall} = $options{styleall}; - } + if($options{curvestyleall} ) { $options{curvestyleall} .= " $options{styleall}"; } + else { $options{curvestyleall} = $options{styleall}; } + delete $options{styleall}; } - push @{$options{curvestyle}}, @{$options{style}}; + push @{$options{curvestyle}}, @{$options{style}}; + delete $options{style}; # --legend and --curvestyle options are conceptually hashes, but are parsed as # arrays in order to preserve the ordering. I parse both of these into hashes