On 18 September 2013 13:38, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> wrote: > Steve Hay <steve.m.hay@googlemail.com> writes: > >> On 18 September 2013 10:54, Andreas Koenig >> <andreas.koenig.7os6VVqR@franz.ak.mind.de> wrote: >>> Steve Hay <Steve.Hay@verosoftware.com> writes: >>> >>>> I'm confused by this report (and the three cpantesters reports listed >>>> above) because the offending commit (80d2c56d79) only changes anything >>>> when running on MSWin32, but all these reports are from linux. >>> >>> Precendence of the ternary: >>> >>> % perl -MO=Deparse,-p >>> $^O eq 'MSWin32' &&$! == ($] < 5.019004) ? 10022 : Errno::EINVAL >>> ^D >>> ((($^O eq 'MSWin32') && ($! == ($] < 5.019004))) ? '???' : '???'); >>> - syntax OK >>> >> >> Gah! >> >> Thanks for pointing that out. Now fixed in commit a576a29029. > > If the intention is to compare $! to a different value depending on the > condition $] < 5.019004, it's still wrong, due to the low precedence of > the ternary operator: > > $ perl -MO=Deparse,-p > ($! == ($] < 5.019004) ? 10022 : Errno::EINVAL) > ^D > (($! == ($] < 5.019004)) ? '???' : '???'); > - syntax OK > > You need this: > > $ perl -MO=Deparse,-p > ($! == ($] < 5.01904 ? 10022 : Errno::EINVAL)) > ^D > ($! == (($] < 5.01904) ? 10022 : 'Errno::EINVAL')); > - syntax OK > > Add the extra parentheses around the condition if you wish to be > explicit. > Thank you for picking up on this. I'm rather embarrassed that I wasn't paying sufficient attention myself. Now really fixed in commit 7a4148d0eb.Thread Previous