Quiq::Exit - Prüfe Exitstatus von Child-Prozess
Quiq::Object
Die Klasse implementiert eine einzelne Methode. Diese prüft den Status eines terminierten Child-Prozesses. Im Fehlerfall löst sie eine Exception aus.
$this->check; $this->check($exitCode); $this->check($exitCode,$cmd);
(Integer) Der Returnwert von system() oder $? im Falle von qx// (bzw. ``).
(String) Ausgeführtes Kommando. Dieses wird im Fehlerfall in den Exception-Text eingesetzt.
Prüfe den Status eines terminierten Child-Prozesses und löse eine Execption aus, wenn dieser ungleich 0 ist.
Prüfe den Status nach Aufruf von system():
my $r = system($cmd); Quiq::Exit->check($r,$cmd);
Minimale Variante (Prüfung über $?):
system($cmd); Quiq::Exit->check;
Prüfe den Status nach Anwendung des Backtick-Operators:
$str = `$cmd`; Quiq::Exit->check($?,$cmd);
1.208
Frank Seitz, http://fseitz.de/
Copyright (C) 2023 Frank Seitz
This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Quiq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quiq
CPAN shell
perl -MCPAN -e shell install Quiq
For more information on module installation, please visit the detailed CPAN module installation guide.