New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior difference in warning for overriding constant v.s. non-constant subroutines #13818
Comments
From @avarCreated by @avarperlsub/Constant-Functions notes that even the -w flag you'll get a 1. $ ./perl -e 'sub x () {1} sub x () {1}' I think it makes sense that if we're going to warn about #2 we should If something's overriding a constant subroutine it should probably While trying to come up with an example for that I found another bug, 8. $ ONE=1 TWO=1 ./perl -e 'BEGIN { my ($one, $two) = @$ENV{qw/ONE TWO/}; *one = sub () { $one }; *one = sub () { $two }; }' I think #8 and #9 sohuld warn just like #10 and #11 do. Perl Info
|
From @cpansproutOn Sat May 10 02:24:53 2014, avar wrote:
If we do change this, we need to make sure that different CVs deriving from the same ‘use constant’ constant need to be exempt from the warning, since the fact that there are two separate CVs is a side effect of the implementation, not a feature per se. I.e., this should not warn: package Foo; require Exporter; package main; use Foo "foo"; -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#121841 (status was 'open')
Searchable as RT121841$
The text was updated successfully, but these errors were encountered: