Changes included.
--- ext/File/Glob/Glob.pm Thu Jul 1 10:11:43 2004
+++ ext/File/Glob/Glob.pm Wed Mar 30 00:55:23 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
}
@@ -204,18 +206,26 @@
## override the core glob (CORE::glob() does this automatically
## by default anyway, since v5.6.0)
use File::Glob ':globally';
- my @sources = <*.{c,h,y}>
+ my @sources = <*.{c,h,y}>;
## override the core glob, forcing case sensitivity
use File::Glob qw(:globally :case);
- my @sources = <*.{c,h,y}>
+ my @sources = <*.{c,h,y}>;
## override the core glob forcing case insensitivity
use File::Glob qw(:globally :nocase);
- my @sources = <*.{c,h,y}>
+ my @sources = <*.{c,h,y}>;
+
+ ## glob on all files in home directory
+ use File::Glob ':globally';
+ my @sources = <~gnat/*>;
=head1 DESCRIPTION
+The glob angel-bracket operator < > is a pathname generator that implements
the
+rules for file name pattern matching used by Unix-like shells such as the
+Bourne shell or C shell.
+
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 +239,17 @@
split its argument on whitespace, treating it as multiple patterns,
whereas bsd_glob() considers them as one pattern.
+=head2 META CHARACTERS
+
+ \ Quote the next metacharacter
+ [] Character class
+ {} Multiple pattern
+ * Match 0 or more times
+ ? Match 1 or 0 times
+ ~ User name home directory
+
+=head2 POSIX FLAGS
+
The POSIX defined flags for bsd_glob() are:
=over 4
@@ -422,6 +443,10 @@
question doesn't contain any colons (e.g. 'lib' becomes ':lib:').
=back
+
+=head1 SEE ALSO
+
+perldoc -f glob, glob(3)
=head1 AUTHOR
--
Steven Schubiger
<[EMAIL PROTECTED]>