> "Differentiated Software Solutions Pvt. Ltd.," wrote:

> I have written two mod_perl programs whose output is same (through
> browser).
> I want to know what are the difference between them!  If there is any
> difference then what are the pros and cons in using both of them?

The second program is taking advantage of the PerlSendHeader feature.
This is mostly a compatibility feature, I would tend to think that it
might be slightly slower (because mod_perl has to watch for the empty
line).

The first program should be a very small amount faster, as far as I
know, but the second has a partial advantage of portability to
non-mod_perl regular CGI environment. I say "partial", because you test
for $ENV{MOD_PERL}, which you don't need to do.

-- 
"The number of Unix installations has grown to 10, with more expected."
 -- The Unix Programmer's Manual, 2nd Edition, June 1972

Reply via email to