++ed by:
Jesse Luehrs

NAME

Plack::Client::Backend - turns a Plack::Request into a PSGI app

VERSION

version 0.06

SYNOPSIS

  package My::Backend;
  use base 'Plack::Client::Backend';

  sub app_from_request {
      my $self = shift;
      my ($req) = @_;
      return sub { ... }
  }

DESCRIPTION

This is a base class for Plack::Client backends. These backends are handlers for a particular URL scheme, and translate a Plack::Request instance into a PSGI application coderef.

METHODS

new

Creates a new backend instance. Takes no parameters by default, but may be overridden in subclasses.

app_from_request

This method is called with an argument of a Plack::Request object, and should return a PSGI application coderef. The Plack::Request object it receives contains the actual env hash that will be passed to the application, so backends can modify that too, if they need to.

as_code

Returns a coderef which will call "app_from_request" as a method.

SEE ALSO

Please see those modules/websites for more information related to this module.

AUTHOR

Jesse Luehrs <doy at tozt dot net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Jesse Luehrs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.




Hosting generously
sponsored by Bytemark