in reply to Dispatching Method Objects
&{ # call the result of the block as a sub $self->{ # lookup in hash $self the result of $dispatch{$command} # lookup $command in %dispatch } }(); # call the sub with no arguments
I am guessing you want to call the sub, passing $self, which should be
&{$dispatch{$command}}($self);
|
|---|