WWW::Pipeline::Services::Output;

This plugin for WWW::Pipeline provide services and mechanisms for delivering the response from the application to the client.

Services

headers

#set:
$pipeline->headers( -status=>'403 Not Authorized'
                    -cookie  => $cookie,
                    -expires => '+3h'
);

#retrieve:
my $loc = $pipeline->headers( '-status' );

#remove:
$pipeline->('-expires' => undef );

The headers service is used to build a hash of http headers in the style of the CGI.pm module. Setting and Deleting header entries can be mixed, however retrieval must be done one at a time.

The headers are stored until the SendResponse phase, when the plugin's installed handler sends them as part of the response. They may be sent earlier by way of the plugin's c<flush()> service.

flush

$pipeline->flush();

Sends any stored headers and any content stored in the application's response service ( which is part of the standard WWW::Pipeline::Services package). flush may be used more than once, but will only send the headers the first time.

Handlers

send

The plugin installs the send handler during the host application's SendResponse phase. The whole of its purpose is to invoke the flush() service as described above.

Authors

Stephen Howard <stephen@thunkit.com>

License

This module may be distributed under the same terms as Perl itself.