ingydotnet / io-all-pm

All in One Perl IO
http://search.cpan.org/dist/IO-All/
38 stars 20 forks source link

Update All.swim #117

Open vadrer opened 3 years ago

vadrer commented 3 years ago

a correction - $_->size looks incorrect

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.1%) to 90.255% when pulling 1ab18b0865c379030353d0031a435e16e1f7edd7 on vadrer:patch-1 into 2c8ab8f4ec5cf2c6c44cc0bfdb8b8ff50a01eeb9 on ingydotnet:master.

sesc commented 3 years ago

And yet it is correct and your untested change unfortunately is the incorrect one. The callback you specify is not called with each element as an argument $cb->($el);, but with it as a localized default variable, as in grep() and map(): { local $_ = $el; $cb->(); }.

vadrer commented 3 years ago

ok, thank you for the correction!