"Andy Lester via RT" <bug-Perl-Critic-Pulp@rt.cpan.org> writes:
Show quoted text>
> ok( -f -r $filename, "$filename exists and is readable" );
>
> I specifically want to check -f because I don't want directories, and
> the file I'm looking for better not be a pipe or device file or
> whatever.
Are you sure? If so then my concept may too strict, and having thought
and decided you're ok, then disable/skip/etc. I had trouble thinking of
much besides a backup or archiver which would genuinely care about
device vs ordinary.
Show quoted text> The -r tells me at least that it's readable. It would be
> nice if the policy didn't complain in this case.
Ah, of a doubled operator. Hmm. I think I would still apply it there,
unless I misunderstand.
Show quoted text> P.S. Big thumbs up on the depth of information in the explanation
> behind the reasoning behind this policy.
:-) I struck a couple of module authors with preemptive -f so couldn't
pass say /dev/null. Can't remember now exactly where, but I collected
the rationale against.
You're a test script is it? I can understand being more relaxed there
since you're in complete control. I have in mind mostly module or
program code, though there could be argument for still keeping up.