diff options
Diffstat (limited to 'lib/Web/Response.pm')
-rw-r--r-- | lib/Web/Response.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Web/Response.pm b/lib/Web/Response.pm index ae22bc0..f9d0bb5 100644 --- a/lib/Web/Response.pm +++ b/lib/Web/Response.pm @@ -158,6 +158,11 @@ sub finalize { }); } +sub to_app { + my $self = shift; + return sub { $self->finalize }; +} + sub _finalize_streaming { my $self = shift; @@ -360,6 +365,11 @@ Returns a valid L<PSGI> response, based on the values given. This can be either an arrayref or a coderef, depending on if an immediate or streaming response was provided. If both were provided, the streaming response will be preferred. +=method to_app + +Returns a PSGI application which just returns the response in this object +directly. + =cut 1; |