rgrep and rcols, etc. use fileno() to check if something is a file handle. This prevents reading from pipes or standard input.
I suggest also using Scalar::Util::reftype to check for a GLOB.
I also added a test to misc.t that reads from a handle that is not a file, to show when it breaks and that also using reftype() fixes it.
All tests are still passing after these changes.
Log in to post a comment.