PerlDancer / PerlDancer/Dancer2
Chained hooks
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 604
- Forks
- 288
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 5
Description
I would love to have a hook that provides an around, rather than a before or after.
The before hook is meant to perform some checks and we're utilizing the halt flag after a before hook to check whether the hook asked to stop a request, simply because the before hook wasn't intended for that.
What people really need is an around hook. It will allow you to add information, send the request along (or not), and applying changes on a return, just like a Plack middleware.
Then we could deprecating changing the response (and stopping the request) from the before hook - which I honestly abhor. A lot of our problems have to do with having a response before there's a response, most of it for the before hook.
What do you think?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by tracing the existing before and after hook handling and its halt and response behavior; the work is done when an around hook's request and return flow is defined and covered without relying on the current before-hook response changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100