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

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

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
January 25, 2012 08:21
Subject:
Re: [perl #108780] overload::StrVal and qr//
Message ID:
20120125162053.GA15535@cancer.codesimply.com
* demerphq <demerphq@gmail.com> [2012-01-25T10:51:14]
> On 24 January 2012 03:03, Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote:
> > * Father Chrysostomos <sprout@cpan.org> [2012-01-22T17:50:54]
> >> Is the overloading pragma new enough to change without breaking things?
> >
> > Making "do { no overloading; qr{foo} }" return a Regexp=REGEXP(..) string is a
> > bug fix.
> 
> Just curious, but is that a ruling-from-on-high, or is it a fact?
> 
> I really do wonder if no overloading in earlier perls would have
> behaved as you describe.
> 
> This is of course totally orthagonal to this being a bug.

In 5.10.1, overloading.pm existed and Regexp were still SCALAR.  "no
overloading" did not get you the StrVal.  This, I say, was a bug, too.

It is not a regression or typo in the source, but a bad behavior to be fixed.

-- 
rjbs

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