sub execute_command{ my $self = shift; my $wanted_command = shift; my @whole_data = @_; $self->{ $wanted_command }->( $self, @whole_data ); }