зеркало из https://github.com/mozilla/pjs.git
Provide a hook for scripts that want to do something after every command
This commit is contained in:
Родитель
ed550ca2e5
Коммит
99a6979f8a
|
@ -70,6 +70,7 @@ sub run {
|
|||
$self->{command} = '';
|
||||
$self->noCommand();
|
||||
}
|
||||
$self->commandDone();
|
||||
} # verifyInput should deal with the errors
|
||||
} except {
|
||||
$self->dump(3, "previous command didn't go over well: @_");
|
||||
|
@ -248,6 +249,11 @@ sub noCommand {
|
|||
$self->unknownCommand(@_);
|
||||
}
|
||||
|
||||
sub commandDone {
|
||||
my $self = shift;
|
||||
$self->getCollectingServiceList('dispatcher.commandDone')->commandDone($self);
|
||||
}
|
||||
|
||||
sub name {
|
||||
my $self = shift;
|
||||
# default our app name to be the name of the executable
|
||||
|
|
Загрузка…
Ссылка в новой задаче