From: Yitzchak Scott-Thoennes Date: Thu, 29 Aug 2002 17:31:31 +0000 (-0700) Subject: Re: glob names and Regexp type introspection X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3b1e556f90ba28c4d3b1af517ecc7796a3da259;p=p5sagit%2Fp5-mst-13.2.git Re: glob names and Regexp type introspection Message-ID: p4raw-id: //depot/perl@17813 --- diff --git a/sv.c b/sv.c index aad6c34..5627656 100644 --- a/sv.c +++ b/sv.c @@ -2948,7 +2948,6 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags) if ( ((SvFLAGS(sv) & (SVs_OBJECT|SVf_OK|SVs_GMG|SVs_SMG|SVs_RMG)) == (SVs_OBJECT|SVs_RMG)) - && strEQ(s=HvNAME(SvSTASH(sv)), "Regexp") && (mg = mg_find(sv, PERL_MAGIC_qr))) { regexp *re = (regexp *)mg->mg_obj; diff --git a/t/op/pat.t b/t/op/pat.t index 767c069..8496f95 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..922\n"; +print "1..924\n"; BEGIN { chdir 't' if -d 't'; @@ -2902,3 +2902,12 @@ print "e" =~ /\P{InConsonant}/ ? "ok $test\n" : "not ok $test\n"; $test++; } $test = 923; + +$a = bless qr/foo/, 'Foo'; +print(('goodfood' =~ $a ? '' : 'not '), + "ok $test\t# reblessed qr// matches\n"); +++$test; + +print(($a eq '(?-xism:foo)' ? '' : 'not '), + "ok $test\t# reblessed qr// stringizes\n"); +++$test;