http://www.perlmonks.org?node_id=223106

Item Description: Slurp entire files into variables

Review Synopsis:

During my daily http://search.cpan.org/recent ritual, I came across a new module called Slurp.

Slurp provides three functions: slurp, to_array and to_scalar. slurp is exported by default, the other two can be exported too.

Object orientation

Again, fake object orientation. You can use either slurp($filename) or Slurp->slurp($filename) to do exactly the same thing. I fail to see how Slurp->to_array is any better than Slurp::to_array. Both can be used.

Naming

This module handles files, so it should be in the File:: namespace. It is, however, just called Slurp. A much better name would be File::Slurp. But that module already exists.

File::Slurp

File::Slurp provides exactly the same functionality, plus some extra handy functions. It has been around since 1996 and is does its job well. Slurp has no advantage over File::Slurp. The author clearly didn't search CPAN, or wants to compete.

Documentation

The only positive sound about this module you'll hear from me is: nice documentation! Every function is docmented in detail.

Conclusion

Slurp does what it is supposed to do and is documented quite well. However, it should not be on CPAN, for two reasons: it is not in the correct namespace and another module already provides the functionality. This module adds nothing to CPAN but needless confusion for people in search of a file slurping module.

I think it should be removed from CPAN, or at least be renamed to something in File::.