Better organize execution flow
This commit is contained in:
parent
273d2a93bc
commit
c8382eabb6
@ -52,12 +52,7 @@ my $json_response;
|
||||
eval {
|
||||
|
||||
$json_response = decode_json($response->content);
|
||||
print "JSON repsonse decoded successfully."
|
||||
|
||||
} or do {
|
||||
print "Unable to decode JSON, invalid response?";
|
||||
exit EXIT_CRITICAL;
|
||||
};
|
||||
print "JSON repsonse decoded successfully.";
|
||||
|
||||
$status = EXIT_OK;
|
||||
|
||||
@ -97,6 +92,11 @@ if ($opts{d}) {
|
||||
|
||||
exit $status;
|
||||
|
||||
} or do {
|
||||
print "Unable to decode JSON, invalid response?";
|
||||
exit EXIT_CRITICAL;
|
||||
};
|
||||
|
||||
sub HELP_MESSAGE
|
||||
{
|
||||
print <<EOHELP
|
||||
|
Loading…
Reference in New Issue
Block a user