The saving and restoring of $@ when utf8 tables were looked up was
causing pp_subst’s string pointers to go stale. The existing mechanism
of copying it temporarily to another scalar was already very fragile,
and the new COW mechanism broke it (but I fixed it in the same commit
that introduced the new COW mechanism).
require './test.pl';
}
-plan( tests => 205 );
+plan( tests => 206 );
$_ = 'david';
$a = s/david/rules/r;
utf8::upgrade $a;
$_ =~ s/$/$a/;
is $_, "\xc4\x80", "empty utf8 repl does not result in mangled utf8";
+
+$@ = "\x{30cb}eval 18";
+$@ =~ s/eval \d+/eval 11/;
+is $@, "\x{30cb}eval 11",
+ 'loading utf8 tables does not interfere with matches against $@';