}
# Needs to update whenever a page is added or removed (or in some
- # cases, when its content changes, if show=title), so register a
- # dependency.
- add_depends($params{page}, $params{pages});
- # Explicitly add all currently shown pages, to detect when pages
- # are removed.
- add_depends($params{page}, join(" or ", keys %mapitems));
+ # cases, when its content changes, if show= is specified), so
+ # register a dependency.
+ add_depends($params{page}, $params{pages}, presence => ! exists $params{show});
# Create the map.
my $parent="";