develooper Front page | perl.perl5.porters | Postings from April 2020

Re: chained comparisons

Thread Previous | Thread Next
From:
David Nicol
Date:
April 8, 2020 16:12
Subject:
Re: chained comparisons
Message ID:
CAFwScO8=dwT=MKmhKBqqGRgt9H2zOHmxzqyjtm5V4haagJ6=Cw@mail.gmail.com
so document this and recommend making local copies of the fetched values
from expensive tied variables, at least for now


my $middleval = $tiedthing;
if ($lowerbound < $middleval < $upperval) { ...


. All users see is that a tied variable is being evaluated twice.
>


-- 
"I know Darth Vader's really got you annoyed
 but remember if you kill him then you'll be unemployed" -- Alfred M.
Yankovic

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About