develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #128241] Deprecate (or change) /$empty_string/

Thread Next
From:
Father Chrysostomos via RT
Date:
July 11, 2016 15:35
Subject:
[perl #128241] Deprecate (or change) /$empty_string/
Message ID:
rt-4.0.18-6105-1468251318-464.128241-15-0@perl.org
On Mon Jul 11 07:13:28 2016, davem wrote:
> Another possibility is to change the behaviour now, but also warn
> whenever the changed behaviour is encountered. For these two
> scenarios:
> 
> 1. The user's code is currently buggy (it expects /$empty/ to be like
> /(?:)/)
> 
> Formerly their code would quietly fail; in future their code will
> noisily
> succeed. They can update their code to either: disable the warning; or
> if
> they want their code to run on older perls, to fix it to be portable.
> 
> 2. The user actually wanted the 'last regex' behaviour on /$empty/:
> 
> Formerly, their code worked;
> in future their code fails, but with a noisy warning, alerting them
> that
> their code needs fixing on newer perls.

I think that sounds like a good idea.  Are you volunteering?  :-)

> And just to recap, IIUC, the current proposal for this ticket is to;
> 
> 1) leave literal // with its 'last regex' behaviour for now.
> 2) change /$empty/ behaviour, with the exact details on deprecation
> and
> warnings to be decided.

Yes, that was the idea.

-- 

Father Chrysostomos


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

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