Brock Wilcox > Continuity-1.5 > Continuity::Adapt::PSGI

Download:
Continuity-1.5.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Continuity-1.6

NAME ^

Continuity::Adapt::PSGI - PSGI backend for Continuity

SYNOPSIS ^

  # Run with on of these:
  #   corona demo.pl
  #   twiggy demo.pl
  #   ./myapp.pl # Will try to fall back to HttpDaemon ;)

  # "Twiggy is a lightweight and fast HTTP server"
  # "Corona is a Coro based Plack web server. It uses Net::Server::Coro under the hood"

  use Continuity;

  my $server = Continuity->new;

  sub main {
    my $request = shift;
    my $i = 0;
    while(++$i) {
      $request->print("Hello number $i!");
      $request->next;
    }
  }

  # This is actually returning a subref to PSI/Plack
  # So put it at the end
  $server->loop;

$adapter->map_path($path)

Decodes URL-encoding in the path and attempts to guard against malice. Returns the processed filesystem path.

syntax highlighting: