I would like to attempt to clarify something that is a source of much unfortunate semantic confusion - CGI.
The Common Gateway Interface is (pretty much) a protocol that allows web servers and external apps to communicate with each other. Practically all common web servers can use the CGI protocol.
CGI-scripts/apps are programs that use this protocol w/o a whole lot of extra features. These 'CGI programs' can be very slow, especially under load, because the web server will (generally) spawn a new process to handle each CGI request, no matter if your app is written in Perl, Python, C, Java, whatever. Perl is simply an especially popular choice for writing 'CGI programs'.
On the other hand, there is CGI the Perl module. This is one of the most popular of many modules that 'wrap' the CGI protocol to make writing 'CGI programs' a lot easier.
Numerous way have been invented to overcome the performance limitations of 'CGI programs', including ASP, servlets, etc. All of them having different ways of avoiding the classic 'CGI program' problem of spawing new processes for each request. Note that Perl has not been left behind in this regard. The Perl-world has mod_perl, FastCGI and probably other modules/apps that attempt to 'embed' a Perl process into Apache servers. Activestate's PerlEx kind of does the same thing for IIS. All of these are rip-snorting fast compared to standard 'CGI programs'.
It's important to note, though, that the use of mod_perl or PerlEx does not necessarily preclude the use of the CGI module or CGI-related modules. The CGI module will just run alot faster w/ mod_perl or PerlEx.
Developing classic 'CGI programs' isn't always a bad idea, despite the wide availability of mod_perl and PerlEx. Some applications will never need the extra performance, and faults in 'CGI programs' won't crash or cause weirdness in your web server.
In reply to Re: How to Make use of CGI with Perl
by Art_XIV
in thread How to Make use of CGI with Perl
by Leena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |