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.