#66 Fix for IO::Misc for handles that are not files

closed-accepted
5
2011-04-30
2011-04-15
No

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.

Discussion

  • Chris Marshall

    Chris Marshall - 2011-04-30

    Thanks for the enhancement patch.

     
  • Chris Marshall

    Chris Marshall - 2011-04-30

    The patch was accepted and applied to the Git sources.
    Thanks for helping out!

     
  • Chris Marshall

    Chris Marshall - 2011-04-30
    • labels: 310017 --> New Feature
    • assigned_to: nobody --> marshallch
    • status: open --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks