On Mon, May 09, 2005 at 11:02:58AM -0500, Patrick R. Michaud wrote:
> On Mon, May 09, 2005 at 09:47:14AM -0600, Paul Seamons wrote:
> > > =item *
> > >
> > > Quantifiers (except C<?> and C<??>) cause a matched subrule or subpattern 
> > > to
> > > return an array of C<Match> objects, instead of just a single object.
> > 
> First, I much prefer an alternate wording to Damian's:
> 
>    The C<*>, C<+>, and C<**{...}> quantifiers all produce an array
>    of C<Match> objects instead of just a single object.

Perhaps better is:

   The C<*>, C<+>, and C<**{...}>  (but not C<?> or C<??>) quantifiers
   cause a matched subrule or subpattern to return an array of C<Match>
   objects, instead of just a single object.

And since I've noticed that a lot of people who see this document
end up asking about the relationship between C<?> and C<**{0..1}>,
perhaps we should just put an explicit note in there somewhere
about it.  For example, at the end of the section we could say
something like:

   Note that the C<?> and C<**{0..1}> both mean "match zero or one
   occurrence", but C<?> always produces a single C<Match> object
   (which may be an unsuccessful match) and C<**{0..1}> always
   produces an array of C<Match> objects (which will likely be
   empty for an unsuccessful match).

Pm

Reply via email to