Mailing List Archive

Should we revert PR21915?
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@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
Re: Should we revert PR21915? [ In reply to ]
On 3/14/24 14:08, Paul "LeoNerd" Evans wrote:
> 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.
Re: Should we revert PR21915? [ In reply to ]
On Thu, Mar 14, 2024 at 06:08:07PM +0000, Paul "LeoNerd" Evans wrote:
> 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"
Re: Should we revert PR21915? [ In reply to ]
On Thu, 14 Mar 2024 18:08:07 +0000
"Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> wrote:

> 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@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/