doing perl web stuff with nginx

This commit is contained in:
Dan Buch
2011-01-03 16:40:52 -05:00
parent 70b5f7b160
commit 50c240b0e1
8 changed files with 174 additions and 0 deletions

20
web/lib/perl/base.pm Normal file
View File

@@ -0,0 +1,20 @@
package base;
use nginx;
sub handler {
my $r = shift;
$r->send_http_header("text/plain");
return OK if $r->header_only;
$r->print("hello!\n");
$r->rflush;
if (-f $r->filename or -d _) {
$r->print($r->uri, " exists!\n");
}
}
1;
__END__