Since we're on the subject of CGI vs libapreq. I've moved to using
Apache2::Request
and APache2::Cookie with no problems. Now I'm wondering if there
isn't an equivalent
for the rest of what CGI.pm offers. In particular, I wondering about
it's html tag output.
Are there any Apache2 equivalents? If not, are there other modules
that will do the same
but only concentrate on the html output (javascript would be nice too?)
I'm hoping to
not have to compile the CGI module. My RSHRD = 23.1 M already. I'm
guessing that's
pretty big. Any ideas?
Thanks,
Boysenberry
boysenberrys.com | habitatlife.com | selfgnosis.com
On Mar 12, 2006, at 10:34 PM, Foo Ji-Haw wrote:
Sure, libapreq and its included modules are the fastest way to parse
parameters and handle cookies. However, hardly anyone needs that
speed. Most people are spending all of their time talking to a
database or doing other I/O tasks, or have pretty minimal web
traffic, or both.
That's true. I spend more time optimising the database and the web ui
then anything.
If you're writing something new, and you don't care about supporting
CGI, and you want to use the fastest option, by all means give
libapreq a try. For most people though, it won't make any measurable
difference which one you use. I wouldn't advise anyone to bother
changing CGI.pm code unless they've run a profiler and seen it show
up high enough to matter.
Apache2::Request, and Apache2::Cookie looks like compatible
replacements to CGI and CGI::Cookie. I think that's the objective
anyway, so that when the need arises, it's just a simple replacement
from the root function call (assuming factoring has been done). I
think the difference will be whether the web application is a high
traffic site-low cpu site, or a high cpu-low traffic one. The
performance gain for the former will be more significant.