From b7a789408d516daf93bea803f628bf3e69b9d5d0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 6 Aug 2014 09:39:29 +0100 Subject: [PATCH 1/1] Process all country rules before continent rules --- bin/mkgeo | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/mkgeo b/bin/mkgeo index bf5ca4d..7b70c22 100755 --- a/bin/mkgeo +++ b/bin/mkgeo @@ -273,30 +273,30 @@ sub match_origin { $match = "preferred"; } - elsif ($cluster->{preferred} && - $cluster->{preferred}->{continents} && - grep { $_ eq $origin->{continent} } @{$cluster->{preferred}->{continents}}) - { - $match = "preferred"; - } elsif ($cluster->{allowed} && $cluster->{allowed}->{countries} && grep { $_ eq $origin->{country} } @{$cluster->{allowed}->{countries}}) { $match = "allowed"; } - elsif ($cluster->{allowed} && - $cluster->{allowed}->{continents} && - grep { $_ eq $origin->{continent} } @{$cluster->{allowed}->{continents}}) - { - $match = "allowed"; - } elsif ($cluster->{denied} && $cluster->{denied}->{countries} && grep { $_ eq $origin->{country} } @{$cluster->{denied}->{countries}}) { $match = "denied"; } + elsif ($cluster->{preferred} && + $cluster->{preferred}->{continents} && + grep { $_ eq $origin->{continent} } @{$cluster->{preferred}->{continents}}) + { + $match = "preferred"; + } + elsif ($cluster->{allowed} && + $cluster->{allowed}->{continents} && + grep { $_ eq $origin->{continent} } @{$cluster->{allowed}->{continents}}) + { + $match = "allowed"; + } elsif ($cluster->{denied} && $cluster->{denied}->{continents} && grep { $_ eq $origin->{continent} } @{$cluster->{denied}->{continents}}) -- 2.39.5