summaryrefslogtreecommitdiff
path: root/devel/p5-File-Slurp/pkg-descr
diff options
context:
space:
mode:
authorJames FitzGibbon <jfitz@FreeBSD.org>1996-10-24 08:04:19 +0000
committerJames FitzGibbon <jfitz@FreeBSD.org>1996-10-24 08:04:19 +0000
commitb08bb9c3b69b44fcc766c92f375a30caeb400b7b (patch)
treed320e80ca83adeb253cd1b8a0a3e02629d0ea93f /devel/p5-File-Slurp/pkg-descr
parentperl5 module for file locking (flock,fcntl). (diff)
perl5 module for single call read & write file routines.
Diffstat (limited to 'devel/p5-File-Slurp/pkg-descr')
-rw-r--r--devel/p5-File-Slurp/pkg-descr28
1 files changed, 28 insertions, 0 deletions
diff --git a/devel/p5-File-Slurp/pkg-descr b/devel/p5-File-Slurp/pkg-descr
new file mode 100644
index 000000000000..789296403703
--- /dev/null
+++ b/devel/p5-File-Slurp/pkg-descr
@@ -0,0 +1,28 @@
+ These are quickie routines that are meant to save a couple
+ of lines of code over and over again. They do not do
+ anything fancy.
+
+ read_file() does what you would expect. If you are using
+ its output in array context, then it returns an array of
+ lines. If you are calling it from scalar context, then
+ returns the entire file in a single string.
+
+ It croaks()s if it can't open the file.
+
+ write_file() creates or overwrites files.
+
+ append_file() appends to a file.
+
+ overwrite_file() does an in-place update of an existing
+ file or creates a new file if it didn't already exist.
+
+ Write_file will also replace a file. The difference is
+ that the first that that write_file() does is to trucate
+ the file whereas the last thing that overwrite_file() is
+ to trucate the file. Overwrite_file() should be used in
+ situations where you have a file that always needs to have
+ contents, even in the middle of an update.
+
+ read_dir() returns all of the entries in a directory
+ except for "." and "..". It croaks if it cannot open the
+ directory.