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.
Actually this is no longer true. in mp2 you can't pass a reference to a
scalar.
Still $r->print is faster :)
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?
Right. When you pass $r as an argument you should set -GlobalRequest (see
the url above). Setting the global $r is time consuming, especially in the
threaded environment.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com