modulereview
Juerd
<p>
During my daily [http://search.cpan.org/recent] ritual, I came across a new module called [cpan://Slurp].
</p>
<p>
Slurp provides three functions: <tt>slurp</tt>, <tt>to_array</tt> and <tt>to_scalar</tt>. <tt>slurp</tt> is exported by default, the other two can be exported too.
</p>
<h3>Object orientation</h3>
<p>
Again, fake object orientation. You can use either <tt>slurp($filename)</tt> or <tt>Slurp->slurp($filename)</tt> to do exactly the same thing. I fail to see how <tt>Slurp->to_array</tt> is any better than <tt>Slurp::to_array</tt>. Both can be used.
</p>
<h3>Naming</h3>
<p>
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.
</p>
<h3>File::Slurp</h3>
<p>
[cpan://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.
</p>
<h3>Documentation</h3>
<p>
The only positive sound about this module you'll hear from me is: nice documentation! Every function is docmented in detail.
</p>
<h3>Conclusion</h3>
<p>
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.
</p>
<p>
I think it should be removed from CPAN, or at least be renamed to something in File::.
</p>
Slurp entire files into variables