Re: CGI versus Apache::Request -- confusion
Mag Gam wrote:
> I am bit confused. While reading the mod_perl book, I noticed they are
> using Apache::Request versus CGI for form data handling. Why is that? Is
> it recommended to use Apache over CGI? Any advantages? I am using CGI
> because its a standard module.[/color]
CGI.pm is old and venerable. But it has a lot of cruft (HTML generation, etc).
Apache::Request is all about requesty things like GET/POST params, cookies, etc.
It is therefore much, much smaller memory wise. It's also much faster. So why
doesn't everyone use it? Well like you said, CGI is a standard Perl module. It's
everywhere that Perl is. Apache::Request needs to installed separately. And for
most applications the speed that A::R gives you won't really make that much
difference. Parameter parsing is almost never a bottleneck in a real application.
Plus Three, LP