|Do you know where your variables are?|
Slurpby Juerd (Abbot)
|on Dec 30, 2002 at 17:55 UTC||Need Help??|
Item Description: Slurp entire files into variables
Slurp provides three functions: slurp, to_array and to_scalar. slurp is exported by default, the other two can be exported too.
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.
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 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.
The only positive sound about this module you'll hear from me is: nice documentation! Every function is docmented in detail.
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::.