Plack&taint模式

| 是否建议使用perl的taint模式开发Plack应用程序(中间件)? 如果是,如何在污染模式下启动plackup和/或Starman?在简单的CGI脚本中,很容易用shebang行完成。
perl -T /path/to/{plackup|starman}
会做这项工作吗?还是这里有推荐的方法?还是不推荐? 关于Plack + Taint模式的组合有什么想法,指针和文章吗?     
已邀请:
        我们通常不建议人们在异味模式下开发Plack应用程序,因为我个人不相信异味模式的用处。 Plack的核心实用程序(例如plackup和Plack :: Utli)尤其不能与异味模式配合使用,因为它需要将给定的.psgi文件作为源代码进行编译。如果您真的想在异味模式下开发应用程序,则必须绕过plackup并使用Plack :: Handler或Plack :: Loader。     
        解决plackup实用程序很简单, 我可以给你一个关于fastcgi的例子,但是用starman做同样的事 忘记了.psgi文件,并使用普通的启动脚本:
my $app = sub {
    my $env = shift;
    #...
}
#read the pid file, check for an old process, kill the old process...
#...

#choose a psgi Server impl.
#i prefere fcgi 
my $manager = new FCGI::ProcManager::MaxRequests({
\'max_requests\'=>100,
\'pid_fname\'=>$pid_file,
\'n_processes\'=> 3,
\'pm_title\'=> $name
});
my $server = Plack::Handler::FCGI->new(
\'listen\'=>[$socket],
\'detach\' => 1,
\'manager\' => $manager
);    #或使用Plack :: Loader加载服务器 #运行您的应用    $ server-> run($ app); 然后使用taintmode perl -T启动您的startup.pl脚本     

要回复问题请先登录注册