Open andk opened 3 weeks ago
This change creates trouble for the idom
if (!!$foo eq !!$bar) { ... }
used to compare values as boolean without caring about the specific form. In other words 0, undef, and "" are all equally false, and all non-zero numbers and non-empty strings are equally true.
I suggest making an explict !!
exempt from this warning because it seems (to me) extremely unlikely that a programmer would expect ! to have lower precedence than 'eq' etc. when used in this way.
!ANY eq !ANY
is already exempt from this warning. Note that the warning in your code says "… between ! and string ne", not "… string eq". The problem is !!$nopts{$key} ne $new
, which does not have a !
on the right-hand side.
I suggest changing this expression to !!$nopts{$key} ne !!$new
or (!!$nopts{$key}) ne $new
or $new ne !!$nopts{$key}
, either of which will avoid the warning.
Ok, thanks for pointing that out. I released an update.
Fail report: http://www.cpantesters.org/cpan/report/ea122652-7dc1-11ef-b2e8-37781cd7e676
Bisect leads to