sv_upgrade(TARG, SVt_PVLV);
sv_magic(TARG, Nullsv, PERL_MAGIC_substr, Nullch, 0);
}
+ else
+ (void)SvOK_off(TARG);
LvTYPE(TARG) = 'x';
if (LvTARG(TARG) != sv) {
#!./perl
-print "1..175\n";
+print "1..176\n";
#P = start of string Q = start of substr R = end of substr S = end of string
$r[$_] = \ substr $s, $_, 1 for (0, 1);
ok 175, join("", map { $$_ } @r) eq "ab";
}
+
+# [perl #23207]
+{
+ sub ss {
+ substr($_[0],0,1) ^= substr($_[0],1,1) ^=
+ substr($_[0],0,1) ^= substr($_[0],1,1);
+ }
+ my $x = my $y = 'AB'; ss $x; ss $y;
+ ok 176, $x eq $y;
+}