# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #117481]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117481 >


<p6eval> rakudo 99e27f: OUTPUT«「/foo/bar/baz/」␤ dirname =>
「/foo/bar/baz/」␤ dirname => 「/foo/bar/」␤ basename => 「baz」␤␤»
<labster> okay, why do I get two copies of dirname when the match only
succeeds once?
<masak> huuhhnn.
<masak> wut.
<masak> I suspect a backtracking-related glitch.
* masak submits labster's rakudobug
<masak> r: say ('/foo/bar/baz/' ~~ m/^ $<dirname>=(.* '/'+)?
$<basename>=(<-[\/]>+) '/'* $ /).keys
<p6eval> rakudo 99e27f: OUTPUT«dirname basename␤»
<masak> labster: .gist shows double 'dirname' keys, but .keys and .perl don't

The .gist output is bizarre. There should never be duplicate keys in a
Match. I haven't dived into the source code to see how that is even
possible.

Reply via email to