develooper Front page | perl.perl5.porters | Postings from October 2003

Re: new slurp module

Thread Previous | Thread Next
Tassilo von Parseval
October 23, 2003 08:23
Re: new slurp module
Message ID:
On Thu, Oct 23, 2003 at 01:58:42PM +0400 Ilya Martynov wrote:
> >>>>> "UG" == Uri Guttman <> writes:
> UG> i am not going to force the issue, i just wanted to bring it up. if the
> UG> consensus is to just put it on cpan, then i will probably keep the
> UG> file::slurp name.
> I've seen file::slurp reinvented zillion times even if developers knew
> about it (along "it is so simple module and I don't want another
> external dependancy" line of reasoning).  There must be a core module
> for this!  Both thumbs up for including it in core. And, yeah, I'd
> keep old name.

I don't see why the core needs to come with its own version of every
common programming pattern around. Even a more efficient solution than
the usual $/=undef trick is quickly done using sysopen/sysread/-s.
Modules that replace a three-liner with two lines (use-statement plus
function call) don't add that much, even if the actual implementation
saves a few microseconds. I find modules going along this line almost
offensive in a way that they make Perl look like a templating system of
blocks of common functionality.

I do like the module's cleanly and efficiently written.
Every core module should be like that. However, File::Slurp itself
should not become part of it IMHO. It is too specialized to justify
another bloat of a Perl distribution. It's place should be in the CPAN.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About