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?"
You might also check out tha AxKit, if you're thinking of moving towards XML+template processors.
Here's a backgrounder & introduction by the author (Matt Sergeant).
- Barrie
There's a really cool perl module for doing this sort of stuff called HTML::Mason. It uses a component model which makes it easy to make a modular web site. I imagine it's roughly the same as using PHP or any of these others but it's the only one I've ever used.
i've been doing perl for web services in perl
for 5 years, now, have architected a few
increasing better systems, and am in the
process of enhancing another system. i'm
very curious about how to convince the
management at my company that it is in their
best interest to release this to the public.
how many other embedded perl systems are there?
are there any embedded java systems besides jsp?
i think we're halfway between continuing to
enhance this system, and porting to a better,
outsourced solution.
any advice?
I haven't personally used mod_perl (sticking to PHP) but i've heard good stuff about it.. It's an Apache module that lets you embed perl code in your file... Similar concept to other pre-processors except it uses the full power of perl...
Subject says it all...
Matt. Want XML + Apache + Stylesheets? Get AxKit.
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.