mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-06-24 23:01:12 +08:00
made the script compatible with perl 5.8 by no longer using the // operator
This commit is contained in:
parent
15b8bc7576
commit
5444886acc
@ -317,7 +317,8 @@ sub mainThread {
|
|||||||
my $xlast;
|
my $xlast;
|
||||||
my $haveNewData;
|
my $haveNewData;
|
||||||
|
|
||||||
while( $_ = ($dataQueue && $dataQueue->dequeue()) // <> )
|
# I should be using the // operator, but I'd like to be compatible with perl 5.8
|
||||||
|
while( $_ = (defined $dataQueue ? $dataQueue->dequeue() : <>))
|
||||||
{
|
{
|
||||||
next if /^#/o;
|
next if /^#/o;
|
||||||
|
|
||||||
@ -344,7 +345,9 @@ sub mainThread {
|
|||||||
# since $. is not meaningful in the plotting thread if we're using the data queue, we pass
|
# since $. is not meaningful in the plotting thread if we're using the data queue, we pass
|
||||||
# $. on the data queue in that case. This construct pulls it from the queue if we're using
|
# $. on the data queue in that case. This construct pulls it from the queue if we're using
|
||||||
# it, otherwise it uses $. directly
|
# it, otherwise it uses $. directly
|
||||||
$xlast = ($dataQueue && $dataQueue->dequeue()) // $.;
|
|
||||||
|
# I should be using the // operator, but I'd like to be compatible with perl 5.8
|
||||||
|
$xlast = defined $dataQueue ? $dataQueue->dequeue() : $.;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($options{dataindex})
|
if($options{dataindex})
|
||||||
|
Loading…
Reference in New Issue
Block a user