New books from Apress

Simon Cozens simon at simon-cozens.org
Sat May 20 14:02:16 BST 2006


Jonathan Stowe:
> > I'm still looking forward to the day we see mod_bbcbasic. Web programming
> > will never be the same again.
> 
> Don't just don't. You never know who is listening.

 % cat hello.bas 
10 PRINT "Content-Type: text/plain"
20 PRINT
30 PRINT "Hello world!"

 % curl http://dev.simon-cozens.org/basic/hello.bas

Hello world!

 % cat /usr/local/share/perl/5.8.4/Apache/Basic.pm 
package Apache::Basic;
use Language::Basic;
use Apache::Constants;
sub handler {
    my $r = Apache->request;
    my $f = $r->filename;
    -r $f || return DECLINED;
    my $program = new Language::Basic::Program;
    $program->input($f);
    $program->parse;
    
    $program->implement;
    return OK;
}
1;

-- 
Britain has football hooligans, Germany has neo-Nazis, and France has farmers. 
-The Times


More information about the london.pm mailing list