develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #108780] overload::StrVal and qr//

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
January 25, 2012 13:01
Subject:
[perl #108780] overload::StrVal and qr//
Message ID:
rt-3.6.HEAD-14510-1327525268-1534.108780-14-0@perl.org
On Wed Jan 25 10:18:43 2012, demerphq wrote:
> So IMO I suggest pretty strongly that this patch be reverted or at
> minimum fixed so it doesnt change the behavior of REGEXP objects
> inside of a match.

It doesn’t seem that hard.  The attached patch makes this simple case work:

$ ./miniperl -Ilib -M-overloading -le '$x = qr/abc/; print $x; print
"abcd" =~ /${x}d/'
Regexp=REGEXP(0x8045a0)
1

But it causes failures elsewhere.  It probably just needs a bit of tweaking.

-- 

Father Chrysostomos


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About