|CC:||perl5-porters [...] perl.org, wolfsage [...] gmail.com|
|Subject:||Misuse of length(@array)|
length(@array) puts @array in scalar context, so @array evaluates to the length of the array, and then length() takes the length of the resulting number. This is almost never correct, so Matthew Horsfall submitted a patch to perl to add a warning (<nntp://nntp.perl.org/CAJ0K8bgyMLK30p6cJTx8ESye-CrguigjwQf2WKES-DuwJYGbwA@mail.gmail.com>). This causes test failures, due to the length(@$data) in Extra.pm: length() used on @array (did you mean "scalar(@array)"?) at ../lib/IO/Compress/Zlib/Extra.pm line 198. I’m pretty sure that line of code is wrong, but I haven’t looked at it too closely. Is there any chance you could make a new IO-Compress release with that fixed, so we can integrate it into blead and apply Mr. Horsfall’s patch? You can test it against a patched perl by checking out the sprout/length-warning branch or by downloading a snapshot from <>.