My Favorite (?) Warnings - Ex-Warnings

Warning categories have proliferated since the warnings pragma was first introduced in Perl 5.6: from 50 in Perl 5.6.2 to 79 in Perl 5.35.5 (the latest as of this writing). But warnings have been removed as well as added. This post documents these -- mostly for historical interest on my part.

chmod

This warning flagged a chmod statement with a literal first argument (the mode) which did not begin with 0, and therefore was not an octal constant. This was removed in Perl 5.8, but perl58delta is silent about why.

experimental::autoderef

This warning was added in Perl 5.20 to flag the experimental use of a scalar in lieu of an array or hash in built-ins such as push and keys. This warning was removed in Perl 5.24 when the feature itself was deemed an unsuccessful experiment and removed. The removal of both feature and warning is documented in perl5240delta.

experimental::lexical_topic

This warning was belatedly added in perl 5.18 to flag the experimental use of a lexical topic variable (that is, my $_). "Belatedly" because lexical topics themselves were introduced in Perl 5.10, but the experimental warnings were not introduced until 5.18. This warning was removed in Perl 5.24 when the feature itself was deemed an unsuccessful experiment and removed. The removal of the feature (but not the warning) is documented in perl5240delta.

umask

This warning flagged a umask statement with a literal argument (the mode) which did not begin with 0, and therefore was not an octal constant. This was removed in Perl 5.8, but perl58delta is silent about why.

y2k

According to the relevant perldiag this warning flagged the concatenation of '19' with a number, representing a possible Y2K bug. The weasel words are because I have not been able to get Perl 5.6 or 5.8 to actually emit the associated diagnostic. At any rate it was removed in Perl 5.10, though perl5100delta is silent about why. I speculate that this warning was recognized as a case of closing the barn door after the horse was gone, since Perl 5.6 (the first with warnings) was released in March of 2000, and the release of Perl 5.10 was December of 2007.

Previous entries in this series:

  1. A Belated Introduction
  2. once
  3. redundant and missing
  4. exiting
  5. uninitialized
  6. redefine

Leave a comment

About Tom Wyant

user-pic I blog about Perl.