#./perl
-use Test::More tests => 46;
+use Test::More tests => 50;
use Scalar::Util qw(refaddr);
is( 0 + $x, 42, "numifies" );
is( cos($x), "far side of overload table", "cosinusfies" );
+ my $q = qr/abc/;
+ ok "abc" =~ $q, '=~ qr// with no "" overloading';
+ ok "abcd" =~ /${q}d/, '=~ /foo$qr/ with no "" overloading';
+ {
+ no overloading 'qr';
+ my $q = qr/abc/;
+ ok "abc" =~ $q, '=~ qr// with no "" or qr overloading';
+ ok "abcd" =~ /${q}d/, '=~ /foo$qr/ with no "" or qr overloading';
+ }
+
{
no overloading;
is( "$x", overload::StrVal($x), "no stringification" );
sv_setsv(tmpstr, sv);
continue;
}
+
+ if (SvROK(msv) && SvTYPE(SvRV(msv)) == SVt_REGEXP) {
+ msv = SvRV(msv);
+ PL_reginterp_cnt +=
+ RX_SEEN_EVALS((REGEXP *)MUTABLE_PTR(msv));
+ }
+
sv_catsv_nomg(tmpstr, msv);
}
SvSETMAGIC(tmpstr);