Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed code example in README.

  • Loading branch information...
commit 92d8f3dc70963f8b738be6624722408e8f8c8588 1 parent 1f43c02
@supernovus authored
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.
Please sign in to comment.
Something went wrong with that request. Please try again.