Skip to content

Commit

Permalink
Run all iterations properly and return:
Browse files Browse the repository at this point in the history
This is a silly mistake but it's very problematic. The `return`
statement here effectively did not allow all candidate hook
subs to run (I think) and didn't not actually prevent the next
line from running (I know!).
  • Loading branch information
xsawyerx authored and veryrusty committed Mar 3, 2016
1 parent 688c661 commit d2ef910
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Dancer2/Plugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,10 @@ sub _exporter_app {
# this is okay because the modifier is there only to
# call candidates, like us (this is in fact how and
# why we were called)
return $_->( $plugin_self, @args )
$_->( $plugin_self, @args )
for @{ $plugin->hooks->{$hook_name} };

return;
}

return $instances{$plugin_addr}{'app'}->execute_hook(@_);
Expand Down

0 comments on commit d2ef910

Please sign in to comment.