A couple of relevant threads:
And quoting myself from the last of those links: All of this seems to indicate that what you want is unfortunately not directly possible. One possible solution, although not the most satisfying, is to abstract the test out into a function that can be mocked...
sub check_perms { my $filename = shift; return -f -w -x $filename; } check_perms("filename") or die;
In reply to Re: Overriding "-s", "-f" and other -X functions
by haukex
in thread Overriding "-s", "-f" and other -X functions
by Doctrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |