+ sub needsbuild (@) { #{{{
+ my $needsbuild=shift;
+
+ @fullPluginList = sort( keys %{ $IkiWiki::hooks{preprocess} } );
+ $pluginString = join (' ', @earlyPluginList) . " : ". join (' ', @fullPluginList);
+
+ foreach my $page (keys %pagestate) {
+ if (exists $pagestate{$page}{listpreprocessors}{shown}) {
+ if ($pagestate{$page}{listpreprocessors}{shown} ne $pluginString) {
+ push @$needsbuild, $pagesources{$page};
+ }
+ if (exists $pagesources{$page} &&
+ grep { $_ eq $pagesources{$page} } @$needsbuild) {
+ # remove state, will be re-added if
+ # the [[!listpreprocessors]] is still there during the
+ # rebuild
+ delete $pagestate{$page}{listpreprocessors}{shown};
+ }
+ }
+ }
+ } # }}}
+