Allow slurp and decode with $file->slurp('UTF-8'); etc.
Allow spew and encode with $file->spew('contents', 'UTF-8'); etc.
Motivation
As we discussed on IRC, allowing these options not only makes it easier for users as well as bring things more inline with what is allowed in the Mojo.js framework.
@Grinnz Correct. Since spurt can take an array of content, we can't easily check the last argument. Discussion was that spurt would likely be done away with in time
Summary
Alter Mojo::File to:
$file->slurp('UTF-8');
etc.$file->spew('contents', 'UTF-8');
etc.Motivation
As we discussed on IRC, allowing these options not only makes it easier for users as well as bring things more inline with what is allowed in the Mojo.js framework.