Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/Plack/Builder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,13 @@ sub builder(&) {
$urlmap;
};
local $_add = sub {
defined wantarray
or Carp::carp("WARNING: You used enable() on non-void context");
$self->add_middleware(@_);
};
local $_add_if = sub {
defined wantarray
or Carp::carp("WARNING: You used enable_if() on non-void context");
$self->add_middleware_if(@_);
};

Expand Down