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

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

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

Im all in favour of fixing instead of reverting if you can figure it out.

perl -Mre=debug -e "/just|another|perl|hacker/"

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