doing perl web stuff with nginx
This commit is contained in:
20
web/lib/perl/base.pm
Normal file
20
web/lib/perl/base.pm
Normal 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__
|
Reference in New Issue
Block a user