# New Ticket Created by  Panu Ervamaa 
# Please include the string:  [perl #64848]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=64848 >


17:07 < pnu> Let's say i have $x='foo' how do i call foo() -- i recall 
there was a syntax like $x.() or something but can't find it now.

17:20 <@TimToady> for a real code ref &$x() works

17:21 <@TimToady> for a symref, you have to use &::($x)() or some such

17:23 <@moritz_> rakudo: sub foo { say "bar" }; my $x = 'foo'; &::($x)()

17:23 < p6eval> rakudo df8662: OUTPUT«Syntax error at line 1, near 
"&::($x)()"␤␤current instr.: 'parrot;PGE;Util;die' p129 
(runtime/parrot/library/PGE/Util.pir:85)␤»


The feature is not implemented yet?

This would be nice while writing a test suite where I have the names of 
different subs and methods to call. Eval workaround is a little evil and 
may lead to other bugs with interpolating the parameters etc.

p.

Reply via email to