Re: parsing behavior of a subrule without/with a repetition specifier

[email protected] (Marcel Grunauer)
Newsgroups perl.recdescent
Message-ID <20011109122236.NOST9577.viefep11-int.chello.at@localhost>
On Friday, November 9, 2001, at 01:11  PM, Randal L. Schwartz wrote:

> Damian> Especially if you have to change the count at some later point, 
> which
> Damian> would mess up any code relying on the type of value returned.
>
> I prefer it the way it is.  (1) may say "match one", which is the
> same as leaving it off, but (1) is closer to (2) than to "". :)

Now, about that  element(s)  vs.  element(s /,/)  issue.

To recap: the first returns an arrayref to a list of elements,
the second returns the last element; if you want all elements
of the second form, use $item{__DIRECTIVEn__}.

How's that for expected behavior?

Marcel

--
Aspect-Oriented Perl            http://codewerk.unixbeard.net/aspects/
cpan> install Aspect
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.