… | |
… | |
1489 | my ($path) = @_; |
1489 | my ($path) = @_; |
1490 | |
1490 | |
1491 | my ($match, $specificity); |
1491 | my ($match, $specificity); |
1492 | |
1492 | |
1493 | for my $region (list) { |
1493 | for my $region (list) { |
1494 | if ($region->match && $path =~ $region->match) { |
1494 | if ($region->{match} && $path =~ $region->{match}) { |
1495 | ($match, $specificity) = ($region, $region->specificity) |
1495 | ($match, $specificity) = ($region, $region->specificity) |
1496 | if $region->specificity > $specificity; |
1496 | if $region->specificity > $specificity; |
1497 | } |
1497 | } |
1498 | } |
1498 | } |
1499 | |
1499 | |
… | |
… | |
2783 | } |
2783 | } |
2784 | |
2784 | |
2785 | sub reload_regions { |
2785 | sub reload_regions { |
2786 | load_resource_file "$MAPDIR/regions" |
2786 | load_resource_file "$MAPDIR/regions" |
2787 | or die "unable to load regions file\n"; |
2787 | or die "unable to load regions file\n"; |
|
|
2788 | |
|
|
2789 | for (cf::region::list) { |
|
|
2790 | $_->{match} = qr/$_->{match}/ |
|
|
2791 | if exists $_->{match}; |
|
|
2792 | } |
2788 | } |
2793 | } |
2789 | |
2794 | |
2790 | sub reload_facedata { |
2795 | sub reload_facedata { |
2791 | load_facedata "$DATADIR/facedata" |
2796 | load_facedata "$DATADIR/facedata" |
2792 | or die "unable to load facedata\n"; |
2797 | or die "unable to load facedata\n"; |