summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-30 14:40:36 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-30 14:43:48 -0800
commit8c9e50e76ac4058a63c63a3d1714aa2556ca9393 (patch)
treec989802a8503d81d0eea09ba2e9d6f18f262d4dc /ext
parent55f7e6c17bde06a4db391cd0c71106c6afc70daa (diff)
downloadperl-8c9e50e76ac4058a63c63a3d1714aa2556ca9393.tar.gz
[perl #107296] Document File::Glob’s default flags
Diffstat (limited to 'ext')
-rw-r--r--ext/File-Glob/Glob.pm23
1 files changed, 21 insertions, 2 deletions
diff --git a/ext/File-Glob/Glob.pm b/ext/File-Glob/Glob.pm
index b9090b6b42..600a2d5c3f 100644
--- a/ext/File-Glob/Glob.pm
+++ b/ext/File-Glob/Glob.pm
@@ -146,6 +146,10 @@ C<{}> are passed undisturbed.
=head2 EXPORTS
+See also the L</POSIX FLAGS> below, which can be exported individually.
+
+=head3 C<:bsd_glob>
+
The C<:bsd_glob> export tag exports bsd_glob() and the constants listed
below. It also overrides glob() in the calling package with one that
behaves like bsd_glob() with regard to spaces (the space is treated as part
@@ -153,6 +157,8 @@ of a file name), but supports iteration in scalar context; i.e., it
preserves the core function's feature of returning the next item each time
it is called.
+=head3 C<:glob>
+
The C<:glob> tag, now discouraged, is the old version of C<:bsd_glob>. It
exports the same constants and functions, but its glob() override does not
support iteration; it returns the last file name in scalar context. That
@@ -163,8 +169,21 @@ means this will loop forever:
...
}
-The bsd_glob() function and the constants below can be exported
-individually.
+=head3 C<bsd_glob>
+
+This function, which is included in the two export tags listed above,
+takes one or two arguments. The first is the glob pattern. The second is
+a set of flags ORed together. The available flags are listed below under
+L</POSIX FLAGS>. If the second argument is omitted, C<GLOB_CSH> (or
+C<GLOB_CSH|GLOB_NOCASE> on VMS and DOSish systems) is used by default.
+
+=head3 C<:nocase> and C<:case>
+
+These two export tags globally modify the default flags that bsd_glob()
+and, except on VMS, Perl's built-in C<glob> operator use. C<GLOB_NOCASE>
+is turned on or off, respectively.
+
+=head3 C<csh_glob>
The csh_glob() function can also be exported, but you should not use it
directly unless you really know what you are doing. It splits the pattern