--- "Philip M. Gollucci" <[EMAIL PROTECTED]> wrote: > > fetching/setting cookies > > fetching parameters (GET arguments or POST) > use APR::Request::* > Its faster as its in XS glue code.
That does look like it will do it just as simply as CGI.pm. APR::Request (libapreq) wasn't part of the httpd or mp2 binary (ppm) so I hadn't noticed it before. > > simple HTML elements > > more complex HTML elements (forms, header/body) > shouldn't you be using templates :) > > Though to implement the template engine, I use > CGI.pm for > popup_menu() and the like.... Cleaner code, but more > memory. I don't have any duplication that would benefit from templates. popup_menu() is a good example where CGI.pm shines. > > I was not aware that Apache2::* or APR::* had > methods for generating HTML. I mean having to get into the html code instead of using the CGI.pm to do it for you. I tend not to take advantage of the CGI.pm methods anyway. > > > print vs. $r->print > This is drastically faster.. especially if you use > one print > per request at the end and/or pass a reference to > the scalar string. > > > Also, the mp2 User's Guide (section 10.9.1) says > > CGI.pm now takes $r as an argument to its new() > > function. What benefit is this? Is it required? > For the most part its optional. > You may need to look at PerlGlobalRequest > http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_ > I'm still confused why this is optional in CGI.pm. Does it save some cycles by avoiding CGI.pm having to sniff around for the Apache requestor? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com