Provide a hook for scripts that want to do something after every command

This commit is contained in:
ian%hixie.ch 2004-09-12 19:44:58 +00:00
Родитель ed550ca2e5
Коммит 99a6979f8a
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -70,6 +70,7 @@ sub run {
$self->{command} = ''; $self->{command} = '';
$self->noCommand(); $self->noCommand();
} }
$self->commandDone();
} # verifyInput should deal with the errors } # verifyInput should deal with the errors
} except { } except {
$self->dump(3, "previous command didn't go over well: @_"); $self->dump(3, "previous command didn't go over well: @_");
@ -248,6 +249,11 @@ sub noCommand {
$self->unknownCommand(@_); $self->unknownCommand(@_);
} }
sub commandDone {
my $self = shift;
$self->getCollectingServiceList('dispatcher.commandDone')->commandDone($self);
}
sub name { sub name {
my $self = shift; my $self = shift;
# default our app name to be the name of the executable # default our app name to be the name of the executable