Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #131089] Different parsing of combined colonpairs

2 views
Skip to first unread message

Zoffix Znet

unread,
Apr 2, 2017, 8:00:02 AM4/2/17
to bugs-bi...@rt.perl.org
# New Ticket Created by Zoffix Znet
# Please include the string: [perl #131089]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=131089 >


If joined colonpairs are after a position arg, only the first colonpair gets registered:

<Zoffix__> m: -> *@_, *%_ { dd [@_, %_] }("/", :r:w:d:x)
<camelia> rakudo-moar 1b9d53: OUTPUT: «[["/"], {:r}]␤»

But if they're first in line, then all do:

<Zoffix__> m: -> *@_, *%_ { dd [@_, %_] }(:r:w:d:x, "/")
<camelia> rakudo-moar 1b9d53: OUTPUT: «[["/"], {:d, :r, :w, :x}]␤»

When in a [], only first one is obtained as well:
<Zoffix__> m: dd [:r:w:d:x]
<camelia> rakudo-moar 1b9d53: OUTPUT: «[:r]␤»

And when in a {}, all are obtained, but only the first one gets value True (related?)
<Zoffix__> m: dd {:r:w:d:x}
<camelia> rakudo-moar 1b9d53: OUTPUT: «Hash % = {:d(1), :r, :w(1), :x(1)}␤»

Jan-Olof Hendig via RT

unread,
May 12, 2019, 4:30:03 PM5/12/19
to
On Sun, 02 Apr 2017 07:48:11 -0700, alex.ja...@gmail.com wrote:
> I wonder, is it a dup of RT #124553 and RT #125353 ?
>
> On 2017-04-02 04:50:15, cp...@zoffix.com wrote:
> > If joined colonpairs are after a position arg, only the first
> > colonpair gets registered:
> >
> > <Zoffix__> m: -> *@_, *%_ { dd [@_, %_] }("/", :r:w:d:x)
> > <camelia> rakudo-moar 1b9d53: OUTPUT: «[["/"], {:r}]␤»
> >
> > But if they're first in line, then all do:
> >
> > <Zoffix__> m: -> *@_, *%_ { dd [@_, %_] }(:r:w:d:x, "/")
> > <camelia> rakudo-moar 1b9d53: OUTPUT: «[["/"], {:d, :r, :w, :x}]␤»
> >
> > When in a [], only first one is obtained as well:
> > <Zoffix__> m: dd [:r:w:d:x]
> > <camelia> rakudo-moar 1b9d53: OUTPUT: «[:r]␤»
> >
> > And when in a {}, all are obtained, but only the first one gets value
> > True (related?)
> > <Zoffix__> m: dd {:r:w:d:x}
> > <camelia> rakudo-moar 1b9d53: OUTPUT: «Hash % = {:d(1), :r, :w(1),
> > :x(1)}␤»

The examples given by Zoffix above seems to have been fixed by https://github.com/rakudo/rakudo/commit/91359141fb7501636b073ccaf6fb6598dc273bec

0 new messages