File-Slurp reviews

cpanratings
 

RSS | Module Info | Add a review of File-Slurp

File-Slurp (9999.19)

uri here. glad to see some nice reviews. check out the .19 version which has edit_file and edit_file_lines. these are similar to the -p/-i options on the command line. you can edit a file in-place (whole file or line by line).

if your review complained about the lack of utf8 support, that was fixed too so please update your comments.

thanx,

uri

Uri Guttman - 2011-12-13T23:59:51 (permalink)

3 out of 3 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.14) *****

The newly-released version has fixes for the huge bug mentioned above: it works with :encoding by passing it off to binmode. Huzzah, File::Slurp is finally worth using! Many thanks to the new maintainer Uri Guttman for picking through the patches on RT and rolling them into the latest release. I hear good things for the future too!

Mike Doherty - 2011-03-22T21:19:06 (permalink)

8 out of 8 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.13) ***

I've been using File::Slurp for years and is generally satisfied with it. However reading the negative reviews today and looking at its RT queue, I realize that this module is broken for many and is effectively abandoned by the maintainer (no new releases for almost 3 years now despite several RT items labeled as critical). So I suggest others checking out the alternatives.

My wishlist for File::Slurp is: a reading mode to automatically chomp newline (very useful for reading simple one-line files).

UPDATE: The maintainer said that a new release is being prepared, along with my new wishlist. Yay!

Steven Haryanto - 2010-11-18T19:21:53 (permalink)

3 out of 3 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.13) *

Simply unacceptable that this module does not work properly in utf-8 environments, failing to pick up on PERL_UNICODE=SAD or handle :raw properly.

See rt.cpan.org/Public/Bug/Display.html?i...

Ironically the documented { atomic => 1, binmode => ':raw' } will give "wide character" error in syswrite(). The undocumented { atomic => 1, binmode => ':utf8' } may actually work.

Bryce Nesbitt - 2010-03-31T20:01:07 (permalink)

5 out of 6 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.13) **

The module does _not_ operate properly with :encoding. After two years bug rt.cpan.org/Ticket/Display.html?id=34444 is still there patiently waiting to be fixed.

It is too much frustration for a simple localized $/

Perl6-Slurp is much cooler and powerful (eg: regex input record separator) although it lacks 'write_file'.

search.cpan.org/~dconway/Perl6-Slurp-...

If you need raw access File-Map is another contender

search.cpan.org/dist/File-Map/lib/Fil...

نديم الخمير - 2010-03-09T04:29:05 (permalink)

2 out of 2 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.13) *****

This module is making perl programming SO MUCH easier...

maybe I cannot finely tune the file reading, but most of the time I just need to read the damn file - and it's exactly what this does.

Karel Bílek - 2010-01-31T13:17:53 (permalink)

2 out of 2 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.13) *****

A lovely package that makes simple but tedious tasks easier. Well documented and very useful.

RB - 2008-09-04T01:54:21 (permalink)

2 out of 2 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.12) **

I really liked this module until the first time I got bitten by its failure to interoperate properly with :encoding on filehandles. I've decided it's almost always easier to just localize $/ briefly and read that way. It's a little uglier and more piggish, but it's more likely to work in odd conditions.

Ricardo Signes - 2007-05-08T18:19:04 (permalink)

11 out of 11 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.09) *****

Overall, I like this module a lot and use it constantly. I have one huge complaint though. There is a critical dataloss bug in the current version that has been unaddressed by the author for the last two weeks.

This command will truncate the file "foo" to zero bytes regardless of what's in the file.

perl -MFile::Slurp -e'append_file("foo", "")'

This could be fixed by a simple workaround: in the append_file function:

return if (-e $file && $content eq "");

UPDATE: The above bug is fixed and I love this module again! Thanks, Uri.

Chris Dolan - 2005-10-07T10:35:52 (permalink)

6 out of 7 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.09) *

It just doesn't work all of the time. I can slurp one file, but then the second file it claims doesn't exist or it is unable to read anything from it.

I don't have the time to diagnose why it doesn't work. It was faster to write my own few lines which were adequate for what I needed.

Robert Rothenberg - 2005-08-19T09:41:17 (permalink)

3 out of 7 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (9999.01) **

I used to list File::Slurp as a dependency for my module, but 9999.01 didn't pass tests. It's also by a different author to the version previously rated as 5*, and has an entirely new codebase.

I replaced it with three lines of code, and for once don't regret the loss of modularity at all.

pmison - 2003-12-17T02:31:04 (permalink)

3 out of 3 found this review helpful. Was this review helpful to you?  Yes No

File-Slurp (2004.0904) *****

A few convenient functions that help uncluttering your code when you need to read (or write) an entire file into (or from) a scalar or an array.

Of course you could write them yourself, but why? They are in File::Slurp, use them.

The version number is quite surprising: I had never seen a module with a date as the version number, much less a date in the future.

Note that an other module, Slurp, which I have never used, seems to do quite the same thing, in a slightly different way: it lets you slurp several files in a single scalar, array or array_ref, but doesn't have functions to write to a file.

mirod - 2003-09-17T05:36:24 (permalink)

3 out of 3 found this review helpful. Was this review helpful to you?  Yes No