The following module was proposed for inclusion in the Module List:
modid: File::Content
DSLIP: adpOp
description: Interface to file contents
userid: RFOLEY (Richard Foley)
chapterid: 10 (File_Names_Systems_Locking)
communities:
mailing lists, email
similar:
File::Slurp
rationale:
Wraps all the accessing of a file into a convenient set of calls
for reading and writing data, including a simple regex interface.
Although there are modules for various file operations, like copy,
delete, etc. there are none which address the actual usage of the
thing. Most people still need to write their own wrappers of the
if ($file =~ /\w+/ -e $file && -w _) { # maybe open(FH, $file) or
die($!); # sometimes if $FH->isopen { seek($FH, 0, 0); # never print
$FH $stuff; } else { # error message? } $FH->close; # hah! } else {
# error message? }
approach, etc. (if they're at least that careful, and I've seen
places where files are opened without any checks at all!
This module attempts to wrap all of this functionality into a
single convenient call:
$o_fil = File::Content->new($file);
If this returns, you can operate on it:
my $i_appended = $o_fil->append($data);
my @found = $o_fil->search('\b\w+\b');
etc. more in the docs.
enteredby: RFOLEY (Richard Foley)
enteredon: Fri Nov 9 11:36:20 2001 GMT
The resulting entry would be:
File::
::Content adpOp Interface to file contents RFOLEY
Thanks for registering,
The Pause Team
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=e0200000_a04c5abeffad1127&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=e0200000_a04c5abeffad1127&SUBMIT_pause99_add_mod_insertit=1