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

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

Thread Previous | Thread Next
Father Chrysostomos via RT
January 25, 2012 13:01
[perl #108780] overload::StrVal and qr//
Message ID:
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/'

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


Father Chrysostomos

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About