develooper Front page | perl.perl5.porters | Postings from October 2018

[perl #133583] Fatalize $* and $#

Thread Next
James E Keenan via RT
October 13, 2018 02:04
[perl #133583] Fatalize $* and $#
Message ID:
On Fri, 12 Oct 2018 15:53:39 GMT, wrote:
> In this commit we implemented a warning, present in perl-5.28, that the 
> use of $* and $# -- both long deprecated -- was no longer supported.
> #####
> commit a678626e6d2dd11740073117f5269f7efee639de
> Author:     Abigail <>
> AuthorDate: Sun Jan 15 13:23:34 2017 +0100
>      Revert "Remove deprecation warnings related to $* and $#."
>      This reverts commit e9b5346b919b4f4cc0096af4644cb0d48d64e14c.
>      We've decided that instead of leaving $* and $# as usuable, 
> magic-free variables, we instead make it fatal to use them. Therefore, 
> we restore the warnings their use gives, and in a subsequent commit, we 
> fix the warning to indicate the version where their use becomes fatal.
> #####
> In preparation for perl-5.30, we need to fatalize their use and adjusts 
> tests and documentation accordingly.
> Thank you very much.

A draft of an implementation of the fatalization of $* and $# can be found in the smoke-me/jkeenan/133583-fatalize-dollar-asterisk-pound branch or in the attached diff (which squashes all the patches in that branch).  Smoke test results can be found at

Please review the patch, particularly with respect to the following:

1. gv.c:  Correct usage of Perl_croak; suitability of error message.

2. Tests:

a. I took the warnings tests relevant to this issue and found in t/lib/warnings/gv and created a new file, t/lib/croak/gv Was this appropriate?

b. There were individual tests in several files which used $# or $*, not necessarily for any specific reason.  In order to get 'make test' to PASS, I had to remove many of these tests.  This runs the risk of unintentionally reducing our test coverage.  The test files in question are:


3. Documentation:   So far the only documentation file altered is pod/perldiag.pod.  So I have not yet made any edits in, say, pod/perldelta.pod.

Please review carefully. If satisfactory, I would like to merge to blead by Thursday, October 17, so that we can get it into the monthly release scheduled for October 20 and then see how much CPAN breakage occurs.

Thank you very much.

James E Keenan (

via perlbug:  queue: perl5 status: new

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