Skip to content
Browse files

Doc PSGI support

  • Loading branch information...
1 parent 3f40dc5 commit 01d2176f8376b14553868c623a273ace5a181310 @stash committed Sep 6, 2010
Showing with 18 additions and 4 deletions.
  1. +3 −0 Changes
  2. +1 −0 TODO
  3. +14 −4 lib/Feersum.pm
View
3 Changes
@@ -1,5 +1,8 @@
Revision history for Perl extension Feersum
+0.90 Mon Sep 6 16:35:00 2010
+ PSGI 1.03 support (except for IO::Handle-like responses)
+
0.02 Fri Apr 23 10:55:54 2010
Renamed a good chunk of the functions & classes.
Made psgi.input and stream-writer objects separate from the main connection class.
View
1 TODO
@@ -11,6 +11,7 @@ psgi.input streaming
IO::Handle-like responses
+ * allow them!
* check if it's got a real file descriptor, optimize (libeio for
non-blocking sendfile?)
* pump the getline() method when connection-writable
View
18 lib/Feersum.pm
@@ -5,7 +5,7 @@ use warnings;
use EV ();
use Carp ();
-our $VERSION = '0.03';
+our $VERSION = '0.90';
require XSLoader;
XSLoader::load('Feersum', $VERSION);
@@ -33,8 +33,6 @@ sub use_socket {
# callbacks.
sub DIED { warn "DIED: $@"; }
-package Feersum;
-
1;
__END__
@@ -45,8 +43,10 @@ Feersum - A scary-fast HTTP engine for Perl based on EV/libev
=head1 SYNOPSIS
use Feersum;
- my $ngn = Feersum->new();
+ my $ngn = Feersum->endjinn; # singleton
$ngn->use_socket($io_socket);
+
+ # register a Feersum handler:
$ngn->request_handler(sub {
my $req = shift;
my $t; $t = EV::timer 2, 0, sub {
@@ -57,6 +57,9 @@ Feersum - A scary-fast HTTP engine for Perl based on EV/libev
undef $t;
};
});
+
+ # register a PSGI handler
+ $ngn->psgi_request_handler($app);
=head1 DESCRIPTION
@@ -200,6 +203,11 @@ callback from getting called.
});
});
+And, finally, you can register a PSGI "app" reference:
+
+ my $app = do $filename;
+ Feersum->endjinn->psgi_request_handler($app);
+
=head1 METHODS
=over 4
@@ -327,6 +335,8 @@ This could lead to a DoS attack on a Feersum server. Suggested remedy is to
only run Feersum behind some other web server and to use that to limit the
entity size.
+IO::Handle-like PSGI responses are not supported.
+
=head1 SEE ALSO
http://en.wikipedia.org/wiki/Feersum_Endjinn

0 comments on commit 01d2176

Please sign in to comment.
Something went wrong with that request. Please try again.