develooper Front page | perl.perl5.porters | Postings from December 2017

[perl #126150] Regex missing from perlref

Thread Previous
From:
Sawyer X via RT
Date:
December 17, 2017 13:24
Subject:
[perl #126150] Regex missing from perlref
Message ID:
rt-4.0.24-20001-1513517047-494.126150-15-0@perl.org
On Sun, 17 Dec 2017 04:20:55 -0800, zefram@fysh.org wrote:
> Sawyer X via RT wrote:
> >since this is a first class citizen in the language,
> 
> No it's not.  The blessing into "Regexp" is perfectly regular blessing;
> anything else can be blessed into "Regexp" just the same, and a regexp
> scalar can be blessed into any other class.

My intention is that you get a Regexp object via qr(). Since this is a pitfall to many people, there is little harm in adding a particular documentaiton for that.

(As for any possible slipper slope argument, I would be in favor of adding other such cases if there were, but this is luckily the only one.)




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

Thread Previous


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