- foreach my $item (keys %links) {
- if (pagespec_match($item, $params{pages}, $params{page})) {
- $mapitems{$item}=urlto($item, $params{destpage});
- }
+ foreach my $item (pagespec_match_list([keys %links],
+ $params{pages}, location => $params{page})) {
+ $mapitems{$item}=urlto($item, $params{destpage});