Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Is there any way to override "file test operator"?by perlancar (Hermit) |
on Jan 31, 2018 at 11:40 UTC ( [id://1208186]=note: print w/replies, xml ) | Need Help?? |
Another use-case is for testing, e.g. I have a test script that detects whether bash exists using -x "/bin/bash". I'd like to be able to simulate the absence of bash by returning false to that expression even though /bin/bash is actually on my filesystem.
In Section
Seekers of Perl Wisdom
|
|