[perl #113796] lib/File/stat.t failures when -l $^X
It seems that gcc produces this:
$ ./perl -Ilib -e 'warn $^X'
/Users/sprout/Perl/perl.git/perl at -e line 1.
while g++ produces this:
$ ./perl -Ilib -e 'warn $^X'
./perl at -e line 1.
(I may be misdiagnosing this, but I have two blead builds that give
different values for $^X.)
The script is using $^X for testing, which is why it could produce
different results.
In any case, this produces the same output for both compilers:
use File::stat;
my $stat = File::stat::stat('./perl');
warn eval '-l $stat';
warn eval '-l "./perl"';
__END__
Warning: something's wrong at - line 3.
1 at - line 4.
The test is wrong, as -l _ will fail after a stat. You have to do
lstat for -l _ to work. Similarly, -l $stat_obj should only return
true if the $stat_obj was returned by File::stat::lstat.
This commit adjusts the test accordingly.