# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #95970] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=95970 >
<masak> is there a method for invoking a Routine? besides postcircumfix:<( )>, I mean? <jnthn> rakudo: sub foo($a) { say $a }; &foo.callwith(42) <p6eval> rakudo 922500: OUTPUT«42» <jnthn> That's what I thought when I saw .callwith :) <masak> oh, interesting, .callwith without being in a call already :) <moritz> why do you need anything besides .() ? <masak> moritz: I don't, I'm just thinking ahead :) <jnthn> Code.callwith(...) has no relation to callwith(...) <masak> oh! <masak> that's... unfortunate... <jnthn> I dunno if the first is even tested, fwiw. <jnthn> I guess if we have it it's spec <jnthn> But it seems kinda...well...pointless. <masak> hm, yes. S06:1146 mentions something of the sort. <masak> "Use of C<callwith> allows the routine to be called without introducing an official C<CALLER> frame." <masak> that seems to be why. <masak> should've been named .gotowith :P <jnthn> oh <jnthn> well, we don't do that. :) * masak submits rakudobug * jnthn doesn't bother re-adding it to nom :) <moritz> masak: use callframe() to prove it :-) <masak> rakudo: sub foo { my $foo; &bar.callwith() }; sub bar { my $bar; say callframe.my }; foo <p6eval> rakudo 922500: OUTPUT«$bar [...] <masak> that's good enough. * masak adds that to the ticket