This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #108780] Make ‘no overloading’ work with qr//
authorFather Chrysostomos <sprout@cpan.org>
Tue, 24 Jan 2012 18:24:21 +0000 (10:24 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 24 Jan 2012 18:34:39 +0000 (10:34 -0800)
commita75c6ed6bbe8051aad5c980a7e52906076b66543
tree5dd08c21fda93de08484d682673066da0836f4b5
parent8d5692911401401dd403c3c2aa0aa3eca63171a4
[perl #108780] Make ‘no overloading’ work with qr//

Traditionally, overload::StrVal(qr//) has returned
Regexp=SCALAR(0xc0ffee), and later Regexp=REGEXP(0xc0c0a) when regexps
were made into first-class SVs.

When the overloading pragma was added in 5.10.1, qr// things were not
accounted for, so they would still stringify as (?-xism:) even with
‘no overloading’ (or as (?^:) under 5.14).

This commit makes the overloading pragma work with qr// things, so
that they stringify the same way as overload::StrVal; i.e., as
Regexp=REGEXP(0xbe600d).
lib/overloading.t
sv.c