sv_setsv(tmpstr, sv);
continue;
}
- sv_catsv(tmpstr, msv);
+ sv_catsv_nomg(tmpstr, msv);
}
SvSETMAGIC(tmpstr);
SP = ORIGMARK;
tmpstr = newSVpvn_flags(t, len, SVs_TEMP | SvUTF8(tmpstr));
}
+ /* If it is gmagical, create a mortal copy, but without calling
+ get-magic, as we have already done that. */
+ if(SvGMAGICAL(tmpstr)) {
+ SV *mortalcopy = sv_newmortal();
+ sv_setsv_flags(mortalcopy, tmpstr, 0);
+ tmpstr = mortalcopy;
+ }
+
if (eng)
PM_SETRE(pm, CALLREGCOMP_ENG(eng, tmpstr, pm_flags));
else
if (ssv) {
STRLEN slen;
- const char *spv = SvPV_const(ssv, slen);
+ const char *spv = SvPV_flags_const(ssv, slen, flags);
if (spv) {
/* sutf8 and dutf8 were type bool, but under USE_ITHREADS,
gcc version 2.95.2 20000220 (Debian GNU/Linux) for
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
- plan (tests => 92);
+ plan (tests => 94);
}
use strict;
TODO: {
local $::TODO = $TODO;
$dummy = $var =~ y/ //; check_count 'y///';
- /$var/ ; check_count 'm/pattern/';
- s/$var// ; check_count 's/pattern//';
}
+ /$var/ ; check_count 'm/pattern/';
+ /$var foo/ ; check_count 'm/$tied foo/';
+ s/$var// ; check_count 's/pattern//';
+ s/$var foo// ; check_count 's/$tied foo//';
s/./$var/ ; check_count 's//replacement/';
# Dereferencing