summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-09 17:15:40 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-09 17:15:40 -0400
commit74409f940d24f51a08becb626e266c91d40d69bd (patch)
tree4d493ab4853468f344e388957b93539b84c88436 /IkiWiki/Plugin
parentecbe5576f8b7152e96653669bc91eae021aaa91f (diff)
add_depends: optimise influence calculation
I made match_* functions whose influences can vary depending on the page matched set a special "" influence to indicate this. Then add_depends can try just one page, and if static influences are found, stop there.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/meta.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index c675880b3..8dcd73a1a 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -291,14 +291,14 @@ sub match {
if (defined $val) {
if ($val=~/^$re$/i) {
- return IkiWiki::SuccessReason->new("$re matches $field of $page", $page => $IkiWiki::DEPEND_CONTENT);
+ return IkiWiki::SuccessReason->new("$re matches $field of $page", $page => $IkiWiki::DEPEND_CONTENT, "" => 1);
}
else {
- return IkiWiki::FailReason->new("$re does not match $field of $page");
+ return IkiWiki::FailReason->new("$re does not match $field of $page", "" => 1);
}
}
else {
- return IkiWiki::FailReason->new("$page does not have a $field");
+ return IkiWiki::FailReason->new("$page does not have a $field", "" => 1);
}
}