PerlDancer / PerlDancer/Dancer2

Before hooks now populating app->response attribute

Open
#885 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
604
Forks
288
Avg merge
1d 5h
Merged PRs (30d)
5

Description

Prior to 42a23b0, the app->response attribute was "really" lazy - we tried hard not to generate a response object until we needed it.

However the localization $Dancer2::Core::Route::RESPONSE in that commit calls $app->response, which triggers the creation of a response object - prior to any before hook being called.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing commit 42a23b0 and the $Dancer2::Core::Route::RESPONSE localization that accesses $app->response, then trace when before hooks run. Confirm the response object remains lazy until it is needed, and add or update a regression test demonstrating that before hooks do not populate it prematurely.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.