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

Re: new slurp module

Thread Previous | Thread Next
From:
Tassilo von Parseval
Date:
October 23, 2003 08:23
Subject:
Re: new slurp module
Message ID:
20031023152134.GA1707@ethan
On Thu, Oct 23, 2003 at 01:58:42PM +0400 Ilya Martynov wrote:
> >>>>> "UG" == Uri Guttman <uri@stemsystems.com> 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 itself...it'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.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About