in reply to Re: Encode::decode_utf8 and references
in thread Encode::decode_utf8 and references

Um, just curious about this, but... what is the point (the purpose, benefit, short-cut or whatever) of passing a hashref to Encode::decode_utf8()?

Your guess is as good as mine. I didn't write this code - I just maintain it. If there's no easy way to restore the behavior of prior versions then I'll probably end up either overriding it (ala the other suggestions) or auditing the code for bad calls to decode_utf8().

(You wouldn't pass a hashref to substr() or index(), would you?)

No, I wouldn't. But to be fair to the original coder, this did work for the entire time he was on the project. I doubt that any of us write code that's safe from all possible changes that could be justified in the future!

-sam

  • Comment on Re^2: Encode::decode_utf8 and references