Skip to content


Subversion checkout URL

You can clone with
Download ZIP
FastCGI application library for Perl 6
Branch: master

Renamed test to examples

latest commit 1a9baa7569
Timothy Totten authored
Failed to load latest commit information.
doc Don't double-parse header, added debugging/profiling code.
examples Renamed test to examples
lib Merge branch 'master' of
.gitignore Skeleton class layout in place. Added S11 provides

FastCGI for Perl 6

A library for building web applications using FastCGI in Perl 6. Uses a PSGI-compliant interface by default, so you can use it with any PSGI-compliant frameworks, such as WWW::App.


Basic functionality works, but is currently fairly slow using the pure-perl implementation of the FastCGI protocol.

I haven't done any extensive testing using input streams or error streams.


Currently the use of the handler() call is required. More advanced use, such as with the new SCGI is planned, but will require some significant refactoring.

use FastCGI;

my $fcgi = :port(9119) );

my $handler = sub (%env) 
  my $name = %env<QUERY_STRING> || 'World';
  my $status = '200';
  my @headers = 'Content-Type' => 'text/plain';
  my @body = "Hello $name\n";;
  return [ $status, @headers, @body ];

$fcgi.handle: $handler;


This requires a Perl 6 implementation that can export constants, and has the pack() and unpack() methods with at least 'C', 'n', 'N', and 'x' format codes supported.


  • Test the STDIN and STDERR streams.
  • Rename FastCGI::Protocol to FastCGI::Protocol:PP
  • Add FastCGI::Protocol::NativeCall as a wrapper to libfcgi
  • Write new FastCGI::Protocol wrapper that uses either PP or NativeCall
  • Refactor the Connection/Request code to allow for custom request loops.


This was build by Timothy Totten. You can find me on #perl6 with the nickname supernovus.


Artistic License 2.0

Something went wrong with that request. Please try again.