The objective is to provide a sensible way to let plugins add files during the
"scan stage" of the build.
Currently does a little verification and adds the file to the global array
@add_autofiles.
use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase
%pagestate %wikistate %renderedfiles %oldrenderedfiles
%pagesources %destsources %depends %depends_simple %hooks
- %forcerebuild %loaded_plugins};
+ %forcerebuild %loaded_plugins @autofiles};
use Exporter q{import};
our @EXPORT = qw(hook debug error template htmlpage deptype
unless grep { $_ eq $link } @{$links{$page}};
}
+sub add_autofile ($) {
+ my $addfile=shift;
+ my ($file,$page) = verify_src_file($addfile,$config{srcdir});
+ if ($page) {
+ push @autofiles, $file;
+ }
+}
+
sub pagespec_translate ($) {
my $spec=shift;