return;
}
+my %pagename_cache;
+
sub pagename ($) {
my $file=shift;
+ if (exists $pagename_cache{$file}) {
+ return $pagename_cache{$file};
+ }
+
my $type=pagetype($file);
my $page=$file;
$page=~s/\Q.$type\E*$//
if ($config{indexpages} && $page=~/(.*)\/index$/) {
$page=$1;
}
+
+ $pagename_cache{$file} = $page;
return $page;
}
my $page=shift;
my $pagespec=shift;
+ if (ref $pagespec eq 'ARRAY') {
+ foreach my $ps (@$pagespec) {
+ if (pagespec_valid($ps)) {
+ $depends{$page}{$ps} = 1;
+ }
+ }
+ return;
+ }
+
return unless pagespec_valid($pagespec);
$depends{$page}{$pagespec} = 1;