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

Re: smartmatch/switch deprecation for 5.28

Thread Previous
From:
Elizabeth Mattijsen
Date:
December 29, 2017 19:43
Subject:
Re: smartmatch/switch deprecation for 5.28
Message ID:
832869C0-F3E1-4D26-A8FD-B4C57CD987C6@dijkmat.nl
> On 29 Dec 2017, at 20:36, Zefram <zefram@fysh.org> wrote:
> Some of the deprecation warnings would have to be generated at runtime,
> but should probably be limited to one warning actually emitted per op
> per program run.

FWIW, I’ve taken the approach of a simple global hash which would key to a stringification of the call site and put the necessary info in there.  And have an END block look at the contents of the hash and print a report unless inhibited somehow (e.g. for testing).  No further internals needed to be changed.



Liz
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