develooper Front page | perl.perl6.compiler | Postings from August 2012

[perl #114430] [BUG] LTA error message when doing ::('') in Rakudo

From:
Carl Mäsak
Date:
August 8, 2012 05:58
Subject:
[perl #114430] [BUG] LTA error message when doing ::('') in Rakudo
Message ID:
rt-3.6.HEAD-11172-1344430695-1947.114430-82-0@perl.org
# 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.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About