manwar / Test-Strict

Test::Strict
Other
2 stars 9 forks source link

Test::Strict: t/01all.t fails on perl-5.37.3 #32

Closed jkeenan closed 3 months ago

jkeenan commented 2 years ago

A change in Perl 5 blead has begun to cause a test failure in this distribution's test suite. The failure looks like this:

$ bleadprove -vb t/01all.t 
t/01all.t .. 
1..59
...
not ok 54 - Syntax check /tmp/4ja1UjrJvU/AWX5AatGfR.pl

#   Failed test 'Syntax check /tmp/4ja1UjrJvU/AWX5AatGfR.pl'
#   at /usr/home/jkeenan/.cpan/build/Test-Strict-0.52-0/blib/lib/Test/Strict.pm line 435.
# 
# This is perl 5, version 37, subversion 4 (v5.37.4 (v5.37.2-418-g8975221916)) built for amd64-freebsd-thread-multi
# 
# Copyright 1987-2022, Larry Wall
# 
# Perl may be copied only under the terms of either the Artistic License or the
# GNU General Public License, which may be found in the Perl 5 source kit.
# 
# Complete documentation for Perl, including FAQ lists, should be found on
# this system using "man perl" or "perldoc perl".  If you have access to the
# Internet, point your browser at https://www.perl.org/, the Perl Home Page.
# 

This problem was first reported to Perl 5's issue tracker as https://github.com/Perl/perl5/issues/20252. Preliminary discussion suggests need to modify t/01all.t.

Can you investigate?

Thank you very much. Jim Keenan

demerphq commented 2 years ago

To explain more, testing code with -c that uses -vw on the shebang line is a mistake, it is a bug that INIT blocks ran after BEGIN did an exit, which how -v is implemented. So before you could check the version AND compile the code at the same time, now you can only do one of the two.

esabol commented 3 months ago

Is this fixed in Test::Strict version 0.54?

jkeenan commented 3 months ago

Is this fixed in Test::Strict version 0.54?

AFAICT, it has been fixed. See: https://github.com/Perl/perl5/issues/20252