Pretending an Autoloaded Function has a Block Prototype

前端 未结 0 803
野趣味
野趣味 2021-01-05 01:13

Let\'s say I have a subroutine that takes a sub as argument.

sub foobar {
    my $block = shift;
    $block->();
}

Then I can call it like

相关标签:
回答
  • 消灭零回复
提交回复
热议问题