Slashdot Mirror


Embedded Perl Solutions As CGI Substitute?

broken77 asks: "At the company I'm working for now, we're starting a new project, and at the same time are looking to find some kind of "standard" method of making our CGI-like perl programs. CGI.pm and cgi-lib.pl have been used in the past, but we're investigating some kind of embedded perl solution similar to ASP or PHP. I should mention that Unix-ASP and PHP are not options (I don't really need to go into the reasons). Also, Perl is definitely the language we will be using. We're looking mainly at ePerl, HTML::Embperl and PerlMagic Lightning. Does anyone have experience with any or all of these? Are there some benchmarks I can find? Are there any products that you've found to be better than these three that I've listed?"

1 of 8 comments (clear)

  1. mod_perl, cgi-registry, and HTML::Embperl by mcramer · · Score: 3
    We use mod_perl all over the place at PBS Online and are very happy with it. If you're careful and modularize your code, you can mix up normal Perl-based CGI, mod_perl based cgi-registry stuff and something like HTML::Embperl very easily. Embperl is nice for templating, as long as you don't go overboard with the amount of perl code you put in the HTML...

    My suggestion is to write as much as you can in .pm modules (perl objects if you're really looking for maintainability) and then just do loops and stuff in your templating language. That way, you can easily write command-line interfaces to the same functions you're calling from your HTML pages...which makes testing MUCH easier and faster.

    As for speed...mod_perl has eliminated perl as the bottle neck for most requests for us...database queries are much slower than the a reasonable perl function, so you can ignore anyone who says that perl is too slow for dynamic, high traffic stuff.