Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: File::Spew - a figment of my imagination?

by RichardK (Parson)
on Sep 09, 2015 at 16:40 UTC ( [id://1141442]=note: print w/replies, xml ) Need Help??


in reply to File::Spew - a figment of my imagination?

File::Slurp has a write_file method, doesn't that do what you want?

  • Comment on Re: File::Spew - a figment of my imagination?

Replies are listed 'Best First'.
Re^2: File::Spew - a figment of my imagination?
by 1nickt (Canon) on Sep 10, 2015 at 13:57 UTC

    File::Slurp is broken, especially with regard to character encoding and I/O layers. It should be eschewed. File::Slurper is a modern replacement, or use Path::Tiny.

    The way forward always starts with a minimal test.

      OH! Is it still broken 4+ years later?

        Here's a recent blog post from Leon Timmermans (author of File::Slurper) titled "File::Slurp is broken and wrong".

        Personally, I have not had any issues using File::Slurp. But then again, I haven't used it in the problematic scenarios as described in the blog post and mentioned in the discussion link provided by 1nickt. Despite not encountering any issues so far, I'm thinking that I might want to revisit some of my older code to change them to not use File::Slurp to help avoid potential problems.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1141442]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-25 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found