(resent, due to mailer issue)
On Sun, Jul 13, 2014 at 03:10:24AM -0400, Eric Brine wrote:
Show quoted text> Your encountering a bug in utf8::is_utf8 that occurs when escape_char($1)
> is performed. Fix follows: (Tested with 5.10.1)
> # Old versions of utf8::is_utf8() didn't properly handle magical vars (e.g. $1).
> # The following forces a fetch to occur beforehand.
> my $dummy = substr($_[0], 0, 0);
Interesting; can you explain what's going on here and why adding this line
helps?
Show quoted text> if (utf8::is_utf8($_[0])) {
> my $s = shift;
This change looks like we were mistakenly adding an extra argument to @_
previously...
Show quoted text> Note that split // is faster than /./sg, so you might want to use: (Tested
> with 5.10.1)
I was considering that earlier (wondering why we were even matching on \C
or . in the first place), but on its own it didn't help anything. But,
agreed that it's faster.
Show quoted text> One of your test files uses subtest() from Test::More. Note that subtest()
> wasn't in Test::More 0.92, the Test::More that comes with 5.10.1. You might
> want to bump the prereq version of Test::More to 0.94.
Thanks, well spotted!