develooper Front page | perl.perl5.porters | Postings from June 2012

RFC: Support for pre-deprecated warnings

Thread Next
Karl Williamson
June 7, 2012 15:29
RFC: Support for pre-deprecated warnings
Message ID:
This is a proposal for a simple implementation of something like Dave 
Golden suggested to deal with deprecations in the Perl language.

And that is to have a release cycle where the to-be-removed construct 
would be "pre-deprecated", where no warning messages are raised unless 
explicitly requested by the user; and then a release cycle where a 
standard deprecated warning is raised.

In the 5.16 delta, we issued some pre-deprecation notices, but there is 
no mechanism to tell someone that the code they are running has or 
doesn't have the issues.

I propose a new command line option to turn on pre-deprecation warnings. 
  This could be the -P flag, which has been unused since 5.12, or a new 
option to the -D flag, one which would be valid on non-DEBUGGING builds.

A pre-deprecation warning could not be packed with others, could not be 
turned on or off with the warnings pragma or other command line options 
such as -W or -X.  It would not be lexical scoped.  Hence, it would 
apply to included modules

If someone wanted to see if something is going to be deprecated, they 
would use the command line option, explicitly or in $PERL5OPT

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