diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-09 17:15:40 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-09 17:15:40 -0400 |
commit | 74409f940d24f51a08becb626e266c91d40d69bd (patch) | |
tree | 4d493ab4853468f344e388957b93539b84c88436 /IkiWiki | |
parent | ecbe5576f8b7152e96653669bc91eae021aaa91f (diff) | |
download | ikiwiki-74409f940d24f51a08becb626e266c91d40d69bd.tar ikiwiki-74409f940d24f51a08becb626e266c91d40d69bd.tar.gz |
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')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 6 |
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); } } |