Use check for defined value after eval(), style fixes, fix typo in sub name and var name
This commit is contained in:
@@ -59,7 +59,7 @@ sub Weather {
|
||||
decode_json ($r->{content});
|
||||
};
|
||||
|
||||
if ($EVAL_ERROR) {
|
||||
unless (defined $fc) {
|
||||
carp "[WARN] openweathermap returns corrupted json: $EVAL_ERROR";
|
||||
return undef;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user