We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ad05a7 commit b982e3dCopy full SHA for b982e3d
doc/Language/functions.pod6
@@ -781,6 +781,19 @@ sub run-it-again-and-again($x) {
781
say power-it(5); # 625
782
=end code
783
784
+X<|nextcallee>
785
+Redispatch may be required to call a block that is not the current scope what
786
+provides C<nextsame> and friends with the problem to referring to the wrong
787
+scope. Use C<nextcallee> to capture the right candidate and call it at the
788
+desired time.
789
+
790
+ my \IOL = Lock.new;
791
+ &say.wrap( -> |c {
792
+ my &wrappee = nextcallee;
793
+ IOL.protect: { &wrappee(|c) }
794
+ });
795
+ for ^100 { say "oops" }
796
797
=head1 Coercion Types
798
799
Coercion types can help you to have a specific type inside a routine, but
0 commit comments