想要创建一个登录到基于 Linux 的存储设备的 Web 应用程序(使用 html/css + javascript),处理存储设备的一些日志(使用 perl) em> 并将结果返回给 Web 应用程序。
什么/如何用作它们之间的连接器?哪一个最简单?
最佳答案
现在不太推荐使用 CGI。 Read this .
正如@Borodin 已经说过的,这里有很多可能性(而且它们确实是基于意见的)。我想使用:Poet - 作为一个非常出色的框架,使用 Mason 模板、内置配置系统、缓存、日志记录 - 完全基于 Moose。缺点是 - 用户基数非常小,您可能永远无法得到诗人/梅森问题的任何答案。
Mojolicious - 另一个不错的网络框架,很多插件,活跃用户。
也许您的需求有所不同 - 检查 https://metacpan.org/ .
对于如何部分 - 快速指南:
#install your own perl - don't pollute he system's perl with new modules
\curl -kL http://install.perlbrew.pl | bash
#follow the instructions add line to .profile and
source ~/.profile
perlbrew install perl-5.20.1
#coffe break
perlbrew switch perl-5.20.1
perlbrew install-cpanm
#install the framework and all dependecies
cpanm Poet
#time for the tea ;)
#generate your skeleton app and start the server
poet new MyAppName
myappname/bin/run.pl
您可以连接到 http://0:5000到您正在工作的网络应用程序并开始开发。
关于javascript - 前端 : html/css+javascript, 后端:perl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28736522/