Open karenetheridge opened 9 years ago
I think the File::Slurp module has gotten tightened up quite a bit over last 5 years.
No, File::Slurp still has (and will always have) serious issues with no workarounds, and is best replaced.
What do you recommend instead? How about https://metacpan.org/pod/File::Slurper?
See the first post in this GHI. File::Slurper came later and is better than File::Slurp::Tiny -- it doesn't have a direct correspondence with the File::Slurp API (which File::Slurp::Tiny does), but that's ok because the API was part of the problem (assuming binmodes etc). Path::Tiny contains pretty much everything you'll ever need to do with a file and is very well-maintained -- it's what I use nearly everywhere.
e.g. look at https://rt.cpan.org/Ticket/Display.html?id=83126 and be dismayed
File::Slurp::Tiny and Path::Tiny are both excellent alternatives. See also http://shadow.cat/blog/matt-s-trout/mstpan-5/