in reply to $SIG{ALRM} with a class method
The answer is to use anonymous sub. This happens quite often with Tk, if you use it.
What if the func takes parameter(s), or the func is a class method. The answer is still the same, anonymous sub, you can just do:$mw->Button(command => \&some_func)->pack();
$mw->Button(command => sub {$obj->some_func($param1, $param2)})->pack( +);
|
|---|