or download this
As of version 2.12, "Encode" supports coderef values for "CHECK";
+see
below.
...
NOTE: Not all encodings support this feature. Some encodings ignor
+e the
*CHECK* argument. For example, Encode::Unicode ignores *CHECK* and
+ it
always croaks on error.