Steven Schubiger wrote:
> 
> Attached is a patch that adds lacking documentation, concerning
> the general use of the angel-bracket operator and meta chars,
> to File::Glob.

Thanks; here are a few comments :

> --- 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 

            angle               C<< <> >>

> +rules for file name pattern matching used by the shell.

which shell ? Should say, "Unix-like shells such as the Bourne shell or
the C 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 `['.

Doesn't this kind of high-level description belong to perlop instead ?

>  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

* and ? definitions are wrong

> +  ~     User name home directory

Also, <~user> works, on some platforms (portability issues should be
mentioned).

Reply via email to