From: Patrick May Date: 2004-09-29T11:05:39+09:00 Subject: Re: fastcgi & continuations (Re: Idea: Webshare) On Friday, September 10, 2004, at 04:58 AM, Brian Candler wrote: > That code is a nasty frig though, when you could just replace > > cgi = CGI::Fast.new > > with > > FCGI.each_cgi do |cgi| > ... > end > > Furthermore, the code then runs transparently in three different ways: > as a > regular CGI, as a FastCGI, or from the command-line (enter name=value > pairs) i want to replace: #!/usr/bin/ruby require 'fcgi' FCGI.each_cgi do |cgi| cgi.out do "Hello, World" end end with: #!/usr/bin/ruby require 'web' puts "Hello, World" The continuation trick makes this possible. Cheers, Patrick