Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execute_hook return value #546

Closed
racke opened this issue Mar 27, 2014 · 3 comments
Closed

execute_hook return value #546

racke opened this issue Mar 27, 2014 · 3 comments
Labels

Comments

@racke
Copy link
Member

racke commented Mar 27, 2014

Actually it eludes me why we use the return value of the last hook sub as return value for execute_hook. That doesn't make sense to me.

@racke racke added the Bug label Mar 27, 2014
@konsumate
Copy link

Actually it does not make sense in the context its designed for, except a poor RNG.
Found the stuff in lib/Dancer2/Core/Role/Hookable.pm:144

Also in Core/App.pm:154 which returns the first hook on a possible candidate in an around "execute_hook"

@konsumate
Copy link

Interesting is that removing the return values breaks t/plugin_syntax.t at line 93 because it checks for the rendered value, which was obviously returned by the hook.

@veryrusty
Copy link
Member

Resolved by 5cd77b6.

shumphrey added a commit to shumphrey/Dancer2 that referenced this issue Apr 24, 2014
…with-app-serializer

* upstream/master: (23 commits)
  readme: fix mailing list and irc links
  new release: 0.13
  reflect changes
  As @veryrusty suggests, make response mark itself as encoded when it uses the serializer
  Update POD to reflect encoding/bytes requirement
  Fix a missing pod C<>
  Properly remove YAML::Any
  Change YAML::Any to YAML
  new version released: 0.12
  reflect another change, update contributors/core devs
  Minor cleanup of comments and POD in Ajax plugin.
  Fix: Additional HTTP methods for Ajax plugin PerlDancer#543
  Reflect changes
  Added a saner test-description, since hooks may influence content, but not by return value
  BugFix PerlDancer#546 execute_hook return value
  Reflect changes and update list of contributors.
  Added --directory option to dancer script
  Remove all test that use Dancer2::Test (except route PODs):
  Reflect changes for recent merges by @racke
  reflect change
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants