When perl gets a bad stat, _ is obliterated. You can see this with the below example.
$>perl -E'say "ok lib" if -e "/lib"; stat("/abcde"); say "ok" if -e _;'
ok lib
In the same way, OFC needs to be able to handle an empty array return when a stat that's being handled by the mock sub is not present.
Right now this isn't supported.
$>perl -w -Mstrict '-MOverload::FileCheck=:all' -E'sub mock {return []}; mock_all_from_stat(\&mock); say -e "/abc"'
Stat array should contain exactly 13 values at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/x86_64-linux-64int/Overload/FileCheck.pm line 633.
When perl gets a bad stat, _ is obliterated. You can see this with the below example.
In the same way, OFC needs to be able to handle an empty array return when a stat that's being handled by the mock sub is not present.
Right now this isn't supported.