in reply to Function call
%handler_for is a hash, $action is a scalar.
The value of $handler_for{$action} is either a coderef (a pointer to a sub) or if this is no-strict-refs code perhaps the name of a function as a string.
&{ $handler_for{ $action } }(%opts) calls that function, passing it %opts as an argument. An alternative, perhaps clearer way of writing it might be:
my $function = $handler_for{$action}; $function->(%opts);
|
|---|