- if (exists $hooks{pagetemplate}) {
- foreach my $id (keys %{$hooks{pagetemplate}}) {
- $hooks{pagetemplate}{$id}{call}->(
- page => $page,
- destpage => $params{page},
- template => $template,
- );
- }
- }
+ run_hooks(pagetemplate => sub {
+ shift->(page => $page, destpage => $params{page},
+ template => $template,);
+ });