On Fri Sep 25 03:30:04 2015, KMX wrote:
Show quoted text> OK, in 2014 you (or ether?) were recommending File::Slurp::Tiny
>
> OK, in 2015 File::Slurp::Tiny is discouraged and Leon recommends
> File::Slurper
Yeah. Turned out ::Tiny couldn't be made completely sensible due to the API.
Show quoted text> OK, <irony> what will come next in 2016? </irony>
Maybe we'll get readline() in core fixed so we don't need any of this crap at all, there've been rumblings ...
Show quoted text> I am in no way a fan of File::Slurp it is just a module (one of
> hundreds) that
> did the job for me in many cases in the past and I know that it works
> (yes, now
> I know it may also cause troubles). Changing Perl-Dist-Strawberry is
> of course
> possible but it needs some time (my time, my free time, my free unpaid
> time,
> you know) for patching and testing and I simply think the achievement
> in this
> case will not be worth the effort.
I wouldn't be upset if you yelled "patches welcome!" and left other people to do the work if they cared enough.
Show quoted text> BTW: File::Sluper is missing a
> replacement
> for append_file which we use.
No it isn't, there's an append option to write_file.
I'm trying to convince leont to add a subroutine for it since people keep not reading the documentation.
Show quoted text> As for the best practice modules bundled with strawberry: the
> alternative
> File::Slurp::Tiny (unfortunately now discouraged) is part of
> strawberry perl
> since 5.20.0 (May 2014 - which is approximately the date of our
> previous
> discussion about File::Slurp). I have no problem with bundling
> File::Slurper
> instead of File::Slurp::Tiny, that's easy.
I don't consider File::Slurp::Tiny exactly discouraged, if you have File::Slurp code it's almost an s/// whereas File::Slurper requires thinking - and if you want appending, actually reading the docs rather than tl;dr-ing them - so having both around seems like a net win to me. Others may disagree though.