On 5/1/2022 4:12 PM, Michael Storz wrote:
Kevin, the change from 'return undef' to "return" is correct because
return returns undef in the scalar context. "return undef" should only
be used when evaluated in the array context and the value undef is
needed instead of ().
I only looked at the case for detect_utf16. If the change is ok for
the other returns, you still have to investigate if you don't trust
the change.
It's not a matter of trust, it's a matter of changing return undef where
there is a comment that says "# let perl figure it out from the BOM".
That comment worries me that the return undef was purposeful.
--
Kevin A. McGrail
kmcgr...@apache.org
Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171