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

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

Thread Next
Father Chrysostomos via RT
July 11, 2016 15:35
[perl #128241] Deprecate (or change) /$empty_string/
Message ID:
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

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About