This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In t/op/filetest.t, simplify the logic for testing read-only files.
Only attempted to change the effective user ID if the test is running as
root. Don't bother consulting $Config to see whether assigning to $> is going
to work - just try it in an eval, and skip if it didn't. Only restore $> if
we know we changed it, and as we only change it from root, we already know
which value to restore it to.
The previous code to check $Config{d_seteuid} was incomplete, as it should
also have been checking for $Config{d_setreuid} and $Config{d_setresuid}, as
$> can use any of these.