How can I get PHP's (deployment) simplicity but Perl's power?

后端 未结 12 1359
没有蜡笔的小新
没有蜡笔的小新 2021-02-12 15:09

I despise the PHP language, and I\'m quite certain that I\'m not alone. But the great thing about PHP is the way that mod_php takes and hides the gory details of integrating wi

相关标签:
12条回答
  • 2021-02-12 15:32

    If Mojolicious had existed when I asked this question, I doubt I would have asked it.

    Specifically, Mojolicious::Lite

    0 讨论(0)
  • 2021-02-12 15:36

    I agree with Aristotle. mod_perlite sounds like just what you are looking for, if only it was finished.

    0 讨论(0)
  • 2021-02-12 15:39

    There are a lot of possibilities, depending on what you want to do.

    If you want to take advantage of the speed of mod_perl, but the simplicity of vanilla CGI, check out the Modperl::Registry distribution from CPAN. This will allow you to run your plain CGI scripts largely unaltered.

    In terms of frameworks, I'm a big fan of CGI::Application. It provides a very simple inheritance-based framework that handles most everything a web application will need to do, giving you the freedom to design your application the way you like. A simple app can be done in a monolithic fashion; a more complex one can use a full-fledged MVC design. Like Perl in general, CGI-App gives you a lot of options and generally stays out of your way.

    CGI-App supports the excellent HTML::Template module by default, and has plugins for other templating systems such as the spectacular Template Toolkit. There are also a plethora of plugins for other purposes.

    If you want more work done for you, check out Catalyst. This way of doing things may be more familiar if you've used Ruby on Rails.

    Other popular web-app frameworks include Jifty and CGI::Prototype, written by Randal Schwartz, which is based on the Class::Prototyped object framework.

    0 讨论(0)
  • 2021-02-12 15:40

    I'd recommend Catalyst with FastCGI. Also, for templating, Template::Toolkit is my personal favorite, but HTML::Mason is also highly regarded in the community.

    0 讨论(0)
  • 2021-02-12 15:44

    I wonder what became of mod_perlite, which was going to provide exactly what you are after.

    0 讨论(0)
  • 2021-02-12 15:47

    I've worked with HTML::Mason, first hacking RT and then creating two sites with it. There's a learning curve, but it's not too bad. Worse, I think, is installing the thing, but that has much more to do with Apache and mod_perl than Mason. Once the pieces are in place, it's only as complicated as you make it (like Perl itself).

    0 讨论(0)
提交回复
热议问题