Attached is a patch that adds lacking documentation, concerning
the general use of the angel-bracket operator and meta chars,
to File::Glob.
Steven.
--- ext/File/Glob/Glob.pm Thu Jul 1 10:11:43 2004
+++ ext/File/Glob/Glob.pm Mon Mar 28 22:17:01 2005
@@ -56,7 +56,7 @@
) ],
);
-$VERSION = '1.03';
+$VERSION = '1.04';
sub import {
require Exporter;
@@ -195,8 +195,10 @@
=head1 SYNOPSIS
use File::Glob ':glob';
+
@list = bsd_glob('*.[ch]');
$homedir = bsd_glob('~gnat', GLOB_TILDE | GLOB_ERR);
+
if (GLOB_ERROR) {
# an error occurred reading $homedir
}
@@ -216,6 +218,15 @@
=head1 DESCRIPTION
+The glob angel-bracket operator < > is a pathname generator that implements
the
+rules for file name pattern matching used by the shell.
+
+The operator matches all accessible pathnames against the pattern and creates a
+list of the pathnames that match. In order to have access to a pathname,
+the operator requires search permission on every component of a path except the
+last and read permission on each directory of any filename component of
+pattern that contains any of the special characters `*', `?', or `['.
+
File::Glob::bsd_glob() implements the FreeBSD glob(3) routine, which is
a superset of the POSIX glob() (described in IEEE Std 1003.2 "POSIX.2").
bsd_glob() takes a mandatory C<pattern> argument, and an optional
@@ -229,6 +240,17 @@
split its argument on whitespace, treating it as multiple patterns,
whereas bsd_glob() considers them as one pattern.
+=head1 META CHARACTERS
+
+ \ Quote the next metacharacter
+ [] Character class
+ {} Multiple pattern
+ * Match 0 or more times
+ ? Match 1 or 0 times
+ ~ User name home directory
+
+=head1 POSIX FLAGS
+
The POSIX defined flags for bsd_glob() are:
=over 4
@@ -422,6 +444,10 @@
question doesn't contain any colons (e.g. 'lib' becomes ':lib:').
=back
+
+=head1 SEE ALSO
+
+glob(3)
=head1 AUTHOR