perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

new 'use VERSION' warnings in some core modules

Open iabyn opened this issue 1 year ago • 2 comments

Description Since v5.39.7-198-g351de214d2, with the the addition this warning:

use VERSION while another use VERSION is in scope is deprecated

a number of core modules have started emitting this warning on stderr during perl's 'make test'. It would be good to get these silenced before 5.40. Here's the relevant output from 'make test':

lib/B/Deparse .................................................... use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 211) line 17, <DATA> chunk 157.


dist/Devel-SelfStubber/t/Devel-SelfStubber ....................... use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 5) line 1.
use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 5) line 1.
use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 5) line 1.
use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 5) line 1.
use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 5) line 1.



dist/SelfLoader/t/01SelfLoader ................................... use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 5) line 1.

dist/SelfLoader/t/02SelfLoader-buggy ............................. use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 5) line 1.

dist/SelfLoader/t/03taint ........................................ use VERSION while another use VERSION is in scope is deprecated, and will become fatal in Perl 5.46 at (eval 5) line 1.

iabyn avatar Feb 21 '24 11:02 iabyn

I can possibly find time to look at these some evening of my vacation but if not I'll be happy to review anyone else's PR if they get there first ;)

leonerd avatar Feb 21 '24 13:02 leonerd

Description Since v5.39.7-198-g351de214d2, with the the addition this warning:

use VERSION while another use VERSION is in scope is deprecated

a number of core modules have started emitting this warning on stderr during perl's 'make test'. It would be good to get these silenced before 5.40. Here's the relevant output from 'make test':

I took a look at these warnings, but they're all outside my skill set to resolve. Except for lib/Deparse.t, the warnings are all emitted as soon as the test starts to run. B::Deparse requires knowledge of the internals that I lack. And I have never used Devel::SelfStubber or SelfLoader (which are intertwined). Tried commenting out the sub Version {$VERSION}; in their respective *.pm files; that made no difference.

So, this is going to require some expert attention.

jkeenan avatar Feb 21 '24 14:02 jkeenan

I believe that @haarg's branch clears up these failures (though CPAN may be a different story, see https://github.com/Perl/perl5/issues/22013).

jkeenan avatar Feb 22 '24 12:02 jkeenan

At current blead:

$ ./perl t/harness lib/B/Deparse.t 
../lib/B/Deparse.t .. ok     

$ ./perl t/harness dist/Devel-SelfStubber/t/Devel-SelfStubber.t 
../dist/Devel-SelfStubber/t/Devel-SelfStubber.t .. ok     

$ ./perl t/harness dist/SelfLoader/t/0*.t
../dist/SelfLoader/t/01SelfLoader.t ........ ok     
../dist/SelfLoader/t/02SelfLoader-buggy.t .. ok   
../dist/SelfLoader/t/03taint.t ............. ok     

So I believe the core tests at least are fine. We can close this?

leonerd avatar Feb 28 '24 19:02 leonerd

Yeah, STDERR no longer noisy.

iabyn avatar Feb 29 '24 09:02 iabyn