Help for this page

Select Code to Download


  1. or download this
    package Foo::Server;
    use HTTP::Server::Simple::CGI;
    our @ISA = qw(HTTP::Server::Simple::CGI);
    our $CALLBACK;
    sub handle_request { $CALLBACK->(@_) }
    
  2. or download this
        
    $Foo::Server::CALLBACK = sub {  
        my ($server, $cgi) = @_;
        print "Hello " . ($cgi->param('name') || 'World') 
    };
    Foo::Server->new()->run();