Subject: | Slightly inconsistent behaviour using something(s /,/) subrules |
In the following program it seems to make a different whether I
use $item[1] or $item{rumsti}, although - according to the docs
- it should be the same.
If I remove the ,'s and use rumsti(s) the behavior of $item[1]
and $item{rumsti} is equivalent. Looks like a buglet to me.
use Parse::RecDescent;
use Data::Dumper;
my $parser = new Parse::RecDescent (q {
startrule : rumsti(s /,/)
{
$return = $item[1]; # this returns a list ref of rumstis
# $return = $item{rumsti} # this returns only the last rumsti
}
rumsti : /\w+/
}) || die $@;
my $text = 'xxx,yyyy,zzzz ramsti';
print Dumper $parser->startrule(\$text);