Skip to content

Commit

Permalink
Fix uninitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jan 21, 2025
1 parent 3ec0704 commit 835f564
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Geo/Coder/Free.pm
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ sub geocode {
} elsif(ref($match) eq 'ARRAY') {
warn __PACKAGE__, ': TODO: handle array: ', Data::Dumper->new([$match])->Dump();
} else {
die __PACKAGE__, ': TODO: handle ', ref($match), ': ', Data::Dumper->new([$match])->Dump();
warn __PACKAGE__, ': TODO: handle ', ref($match), ': ', Data::Dumper->new([$match])->Dump();
}
}
$self->{'scantext'}->{$key} = \@matches;
Expand Down
1 change: 1 addition & 0 deletions lib/Geo/Coder/Free/MaxMind.pm
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ sub geocode {
# ::diag(__LINE__, ': ', Data::Dumper->new([$city])->Dump());
if(defined($city) && defined($city->{'Latitude'})) {
# Cache and return result
delete $city->{'Region'} if(defined($city->{'Region'}) && ($city->{'Region'} =~ /^[A-Z]\d$/)); # E.g. Region = G5
my $rc = Geo::Location::Point->new({
%{$city},
('database' => 'MaxMind', 'confidence' => $confidence)
Expand Down

0 comments on commit 835f564

Please sign in to comment.