diff options
author | Simon McVittie <smcv@debian.org> | 2014-03-05 10:11:04 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2014-03-05 10:42:19 +0000 |
commit | a9fc30b19cfb68c1bd326e0088a677fc87c7dca5 (patch) | |
tree | 920c0949467e359a62e8c02ace24b730c0470d12 /IkiWiki.pm | |
parent | 236c46a3f7e5e62296484dc47b4882f7f4327a06 (diff) | |
download | ikiwiki-a9fc30b19cfb68c1bd326e0088a677fc87c7dca5.tar ikiwiki-a9fc30b19cfb68c1bd326e0088a677fc87c7dca5.tar.gz |
Track whether we're in the scan or render phase
In the scan phase, it's too early to match pagespecs or sort pages;
in the render phase, both of those are OK.
It would be possible to add phases later, renumbering them if necessary
to maintain numerical order.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index d8cfc31cc..9511c8303 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,7 +14,7 @@ use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %delpagesources %destsources %depends %depends_simple @mass_depends %hooks %forcerebuild %loaded_plugins %typedlinks - %oldtypedlinks %autofiles @underlayfiles $lastrev}; + %oldtypedlinks %autofiles @underlayfiles $lastrev $phase}; use Exporter q{import}; our @EXPORT = qw(hook debug error htmlpage template template_depends @@ -34,6 +34,11 @@ our $DEPEND_CONTENT=1; our $DEPEND_PRESENCE=2; our $DEPEND_LINKS=4; +# Phases of processing. +sub PHASE_SCAN () { 0 } +sub PHASE_RENDER () { 1 } +$phase = PHASE_SCAN; + # Optimisation. use Memoize; memoize("abs2rel"); |