Skip to content

Commit e613e72

Browse files
committed
Fix for latest PAGI: stash moved to PAGI::Stash
1 parent be8c180 commit e613e72

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Revision history for Thunderhorse
22

33
{{$NEXT}}
4+
[Fixes]
5+
- Fix an error caused by PAGI moving stash from request to PAGI::Stash
46

57
0.103 - 2026-03-24
68
[Fixes]

cpanfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on 'test' => sub {
33
};
44

55
requires 'perl' => '5.040';
6-
requires 'PAGI' => '0.001020';
6+
requires 'PAGI' => '0.001023';
77
requires 'Gears' => '0.100';
88
requires 'Mooish::Base' => '1.005';
99
requires 'Future::AsyncAwait' => 0;

lib/Thunderhorse/Context.pm

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use Thunderhorse::Request;
99
use Thunderhorse::Response;
1010
use Thunderhorse::WebSocket;
1111
use Thunderhorse::SSE;
12+
use PAGI::Stash;
1213

1314
extends 'Gears::Context';
1415

@@ -26,7 +27,6 @@ has field 'match' => (
2627
has field 'req' => (
2728
(STRICT ? (isa => InstanceOf ['Thunderhorse::Request']) : ()),
2829
default => sub ($self) { Thunderhorse::Request->new(context => $self) },
29-
handles => [qw(stash)],
3030
);
3131

3232
has field 'res' => (
@@ -48,6 +48,11 @@ has field 'sse' => (
4848
lazy => sub ($self) { Thunderhorse::SSE->new(context => $self) },
4949
);
5050

51+
has field 'stash' => (
52+
(STRICT ? (isa => InstanceOf ['PAGI::Stash']) : ()),
53+
default => sub ($self) { PAGI::Stash->new($self) },
54+
);
55+
5156
has field '_consumed' => (
5257
(STRICT ? (isa => Bool) : ()),
5358
writer => 1,
@@ -176,6 +181,10 @@ Events scope.
176181
177182
B<predicate:> C<has_sse>
178183
184+
=head3 stash
185+
186+
The <PAGI::Stash> object for this context. Created automatically.
187+
179188
=head2 Methods
180189
181190
=head3 new
@@ -185,10 +194,6 @@ B<predicate:> C<has_sse>
185194
Standard Mooish constructor. Consult L</Attributes> section for available
186195
constructor arguments.
187196
188-
=head3 stash
189-
190-
Delegated method for L<PAGI::Request/stash>
191-
192197
=head3 scope
193198
194199
$scope = $ctx->scope()

0 commit comments

Comments
 (0)