Permalink
Browse files

Fixed code example in README.

  • Loading branch information...
1 parent 1f43c02 commit 92d8f3dc70963f8b738be6624722408e8f8c8588 @supernovus committed Feb 27, 2010
Showing with 13 additions and 8 deletions.
  1. +13 −8 README
View
21 README
@@ -22,16 +22,21 @@ Oh yeah, and instead of using the while loop as shown on the Perl 5 SCGI
documentation, there is a convenience method called 'handle' that does
the heavy lifting for you:
-use SCGI;
-my $scgi = SCGI.new( :addr<localhost> :port(8080) );
-my $handler = sub (%env) {
- my $name = %env<QUERY_STRING> // 'world';
- my $response = "Content-Type: text/plain\n\n";
- $response ~= "Hello $name\n";
- return $return;
-}
+ use SCGI;
+
+ my $scgi = SCGI.new( :addr<localhost> :port(8080) );
+
+ my $handler = sub (%env) {
+ my $name = %env<QUERY_STRING> // 'world';
+ my $response = "Content-Type: text/plain\n\n";
+ $response ~= "Hello $name\n";
+ return $return;
+ }
+
+ $scgi.handle: $handler;
+
Yeah, that's it. A simple SCGI script.

0 comments on commit 92d8f3d

Please sign in to comment.