From f181b7fa0fe5ce41ccbd93d6e142d35f62fa4d10 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 2 Apr 2012 13:50:58 -0400 Subject: [PATCH] uniq list for changed hook There can be dups when eg, adding a new internal page, apparently. --- IkiWiki/Render.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 5b461611d..d6c1f4f4c 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -832,10 +832,10 @@ sub refresh () { run_hooks(rendered => sub { shift->(keys %rendered) }); run_hooks(change => sub { shift->(keys %rendered) }); # back-compat } - run_hooks(changes => sub { - shift->(@$new, @$changed, @$del, - @$internal_new, @$internal_changed, @$internal_del); - }); + my %all_changed = map { $_ => 1 } + @$new, @$changed, @$del, + @$internal_new, @$internal_changed, @$internal_del; + run_hooks(changes => sub { shift->(keys %all_changed) }); } sub clean_rendered { -- 2.39.5