# 名称
# 简介
使用Mojo::Server::PSGI; my$psgi=Mojo::Server::psgi->new; $psgi->unsubscribe(“请求”)->on(request=>sub($psgi,$tx)){ #请求 我的$method=$tx->req->方法; 我的$path=$tx->req->url->path; #响应 $tx->res->code(200); $tx->res->headers->content_type('text/plain'); $tx->res->body(“$path!的$method请求”); #恢复交易记录 $tx->简历; }); 我的$app=$psgi->to_psgi_app;
# 描述
# 活动
# 属性
# 方法
# 运行
我的$res=$psgi->run($env);
# 到_psgi_app
我的$app=$psgi->to_psgi_app;