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


<masak> is there any way to call a sub called '::(name)'? :)
<jnthn> ::('::(name)')()
<jnthn> uh
<jnthn> ::('&::(name)')() # more likely
<masak> r: constant name = 'foo'; sub ::(name) () { 42 }; say ::('::(name)')()
<p6eval> rakudo 34e8d4: OUTPUT«Start of substr out of range. Is: 1,
should be in 0..0␤  in method Str [...]
<masak> oh wow.
<masak> r: ::('')
<p6eval> rakudo 34e8d4: OUTPUT«Start of substr out of range. Is: 1,
should be in 0..0␤  in method Str [...]
* masak submits rakudobug
<jnthn> oh, duh
<jnthn> ::('...') pays attention to ::s
<jnthn> So it will try to split on them
<jnthn> I wanted ::{'&::(name)'}()
<masak> r: constant name = 'foo'; sub ::(name) () { 42 }; say ::{'&::(name)'}()
<p6eval> rakudo 34e8d4: OUTPUT«42␤»
<masak> \o/
<jnthn> But yes, the error for giving something wrong to interpolation
is LTA there.
<masak> this all goes into the ticket.
<jnthn> If you're going to file that substr thing it is a separate ticket.
<jnthn> (to implemeting indirect method name support)
<masak> that's the one I'm filing.

Reply via email to