evalEmpire / perl5i

A single module to fix as much of Perl 5 as possible in one go
http://search.cpan.org/perldoc?perl5i
Other
156 stars 42 forks source link

stat() in array context does not work with perl 5.23.3 and greater #291

Open eserte opened 9 years ago

eserte commented 9 years ago

The File-stat.t test fails:

$ perl5.23.4 -Mblib t/File-stat.t                                          
ok 1 - An object of class 'File::stat' isa 'File::stat'
ok 2
not ok 3 - stat() in array context
#   Failed test 'stat() in array context'
#   at t/File-stat.t line 10.
#     Structures begin differing at:
#          $got->[0] = Does not exist
#     $expected->[0] = '17'
not ok 4 - lstat() in array context
#   Failed test 'lstat() in array context'
#   at t/File-stat.t line 11.
#     Structures begin differing at:
#          $got->[0] = Does not exist
#     $expected->[0] = '17'
1..4
# Looks like you failed 2 tests of 4.
andk commented 9 years ago

Now also reported as BBC to https://rt.perl.org/rt3/Ticket/Display.html?id=126545

schwern commented 8 years ago

Need to change stat(@_) to stat($_[0]).

schwern commented 8 years ago

Fixed by #293

pghmcfc commented 6 years ago

The same fixes should be applied in 0.pm and 1.pm too.

schwern commented 6 years ago

@pghmcfc Well volunteered.