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

new slurp module

Thread Next
Uri Guttman
October 23, 2003 01:31
new slurp module
Message ID:

i have written a new module File::Slurp that does atomic file i/o - it
reads in and writes out whole files. it uses the same api as the
File::Slurp module on cpan. the author of that module has granted the
namespace to me but i am not sure about keeping the name File::Slurp.

i would like to propose that my module be part of the 5.10 distribution
and so i think it should go under the IO::File namespace. one advantage
to a new namespace is that it won't have to be fully compatible with the
existing File::Slurp module (which exports all of its subs). also we can
then teach and promote use of this since it is faster than any commonly
used slurp idiom or module and it will be in the core distribution. it
also has a very simple and flexible interface.

you can download it from:

there is a benchmark script and article (due on in a couple of
weeks) in the extras/ dir. the speed improvements are fully covered in
the article.

i would like to nail down a namespace before i release it to cpan and
publish the article. one suggestion was File::Atomic or its variant
IO::File::Atomic. slurp isn't a proper name since the module also can
write (spew? burp?) out files in one call. any naming ideas are
welcome. also any i welcome any general feedback on the article, the
code, or the pod before it all goes public.

there are also some problems with some tests (pipe slurp) on windows
machines. i am working on this but i have no direct access to windows (i
will have some tomorrow night). so if any windows experts wanna delve
into those tests and fix them, it would be cool.



Uri Guttman  ------  --------
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------

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