1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use Apache2::RequestUtil ();
use Apache2::RequestRec ();
use Apache2::Const -compile => qw(OK);
sub handler {
my $r = shift;
Apache2::RequestUtil->request($r)
$r->subprocess_env;
$r = Apache2::RequestUtil->request;
$r->content_type("text/html");
$r->print("Hello World");
};
return Apache2::Const::OK;
}
1;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use Apache2::RequestUtil ();
use Apache2::RequestRec ();
use Apache2::Const -compile => qw(OK);
use Mojolicious::Lite;
sub handler {
my $r = shift;
Apache2::RequestUtil->request($r
$r->subprocess_env;
$r = Apache2::RequestUtil->request;
get '/:foo' => sub {
my $self = shift;
my $foo = $self->param('foo');
$self->render(text => "Hello from $foo.");
};
return Apache2::Const::OK;
}
app->start;
1;