Discussion:
Should we revert PR21915?
(too old to reply)
Paul "LeoNerd" Evans
2024-03-14 18:08:07 UTC
Permalink
This PR: https://github.com/Perl/perl5/pull/21915

Discussing this in PSC meeting, on further observation it feels like we
might want to revert this commit.

It is causing various test collateral damage, e.g.
https://github.com/Perl/perl5/issues/21995

It only warns in this one specific order - package then lexical; it
would not warn in the arguably much-more-likely case of lexical then
package (e.g. because of use VERSION implicit imports). So it's not
very useful to users.

The analogous case using variables does not cause a warning (other than
the 'once' warning):

$ perl -Mwarnings -M-warnings=once -cE '$main::var = 123; my $var = 456'
-e syntax OK

$ perl -ce'use strict; use warnings; use vars q[$foo]; my $foo = 1;'
-e syntax OK

All of these reasons suggest that maybe this wants to be removed. More
discussion may be required.
--
Paul "LeoNerd" Evans

***@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
James E Keenan
2024-03-14 18:26:20 UTC
Permalink
Post by Paul "LeoNerd" Evans
This PR: https://github.com/Perl/perl5/pull/21915
Discussing this in PSC meeting, on further observation it feels like we
might want to revert this commit.
It is causing various test collateral damage, e.g.
https://github.com/Perl/perl5/issues/21995
Revert. IMO, the commit's benefit is not sufficient to warrant the time
and effort we would have to expend between now and May 20 to get
everything right. Easier to come back in the next dev cycle.
Dave Mitchell
2024-03-16 17:06:04 UTC
Permalink
Post by Paul "LeoNerd" Evans
Discussing this in PSC meeting, on further observation it feels like we
might want to revert this commit.
I am generally in favour of reverting commits which were added near a
release date and which have caused unexpected breakage, then worry about
them post-release.
--
"Do not dabble in paradox, Edward, it puts you in danger of fortuitous wit."
-- Lady Croom, "Arcadia"
Paul "LeoNerd" Evans
2024-03-18 15:57:44 UTC
Permalink
On Thu, 14 Mar 2024 18:08:07 +0000
Post by Paul "LeoNerd" Evans
This PR: https://github.com/Perl/perl5/pull/21915
Discussing this in PSC meeting, on further observation it feels like
we might want to revert this commit.
A revert PR now here:

https://github.com/Perl/perl5/pull/22085

jkeenan has already reviewed OK, so unless anyone screams "no don't do
it" by about this time tomorrow, it'll go in and that'll be part of
5.39.9, which I'll then make on Wednesday.
--
Paul "LeoNerd" Evans

***@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
Loading...