NAME
MVC::Neaf::Request::FakeWriter - part of test suite for Not Even A Framework
DESCRIPTION
See MVC::Neaf and MVC::Neaf::Request::PSGI. Unless you plan to contribute to framework itself, this module is useless.
This module converts PSGI asynchronous response with callback to a normal straightforward response ([status, header, content]).
SINOPSYS
use Data::Dumper;
use MVC::Neaf::Request::FakeWriter;
my $capture = MVC::Neaf::Request::FakeWriter->new;
my $result = $capture->respond( $psgi_app_return );
warn Dumper( $result ); # normal PSGI response
# aka [ status, [ head...], [content...] ]
METHODS
new
Constructor (no args).
respond( sub { ... } )
Respond to provided callback in PSGI-compatible manner.
write( $data )
Append given data to buffer.
close()
Do nothing.
LICENSE AND COPYRIGHT
This module is part of MVC::Neaf suite.
Copyright 2016-2023 Konstantin S. Uvarin khedin@cpan.org
.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.