On Wed, 30 Mar 2005 03:41:03 +0200 (CEST), Steven Schubiger
<[EMAIL PROTECTED]> wrote:
Thanks, applied as change #24097 with chromatic's change to the angel
> --- ext/File/Glob/Glob.pm Thu Jul 1 10:11:43 2004
> +++ ext/File/Glob/Glob.pm Wed Mar 30 03:35:21 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,22 @@
> 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 any string of characters
> + ? Match any single character
> + ~ User name home directory
> +
> +The metanotation ``a{b,c,d}e'' is a shorthand for ``abe ace ade''. Left
> +to right order is preserved, with results of matches being sorted sepa-
> +rately at a low level to preserve this order. As a special case `{', `}',
> +and `{}' are passed undisturbed.
> +
> +=head2 POSIX FLAGS
> +
> The POSIX defined flags for bsd_glob() are:
>
> =over 4
> @@ -422,6 +448,10 @@
> question doesn't contain any colons (e.g. 'lib' becomes ':lib:').
>
> =back
> +
> +=head1 SEE ALSO
> +
> +L<perlfunc/glob>, glob(3)
>
> =head1 AUTHOR
>
> --
> Steven Schubiger
> <[EMAIL PROTECTED]>
>
>
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.5, & 5.9.2 on HP-UX 10.20, 11.00 & 11.11,
AIX 4.3 & 5.2, SuSE 9.1 & 9.2, and Cygwin. http://www.cmve.net/~merijn
Smoking perl: http://www.test-smoke.org, perl QA: http://qa.perl.org
reports to: [EMAIL PROTECTED], [email protected]