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

[perl #133751] ref function returns 'Regexp', not 'REGEXP' for qr//

From:
Tony Cook via RT
Date:
January 22, 2019 04:03
Subject:
[perl #133751] ref function returns 'Regexp', not 'REGEXP' for qr//
Message ID:
rt-4.0.24-15911-1548129778-444.133751-15-0@perl.org
On Tue, 15 Jan 2019 14:45:47 -0800, tonyc wrote:
> On Sat, 05 Jan 2019 13:46:31 -0800, xsawyerx@gmail.com wrote:
> > 
> > On 1/4/19 6:04 PM, demerphq wrote:
> > > On Fri, 4 Jan 2019 at 00:46, Dave Mitchell <davem@iabyn.com> wrote:
> > >> I think the docs should say (as before):
> > >>
> > >> If the unblessed referent is a scalar, then the return
> > >> value will be one of the strings C<SCALAR>, C<VSTRING>, C<REF>,
> > >> C<GLOB>,
> > >> C<LVALUE>, or C<REGEXP>, depending on the kind of value the scalar
> > >> currently has.
> > >>
> > >> But append:
> > >>
> > >> But note that C<qr//> scalars are created already blessed, so
> > >> C<ref qr/.../> will likely return C<Regexp>.
> > 
> > 
> > +1
> 
> See the attached patch.

Applied as 4829a1eae86ed3e8609d4c93e7c8f8800785c4bb.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133751



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