perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Johnstone" <modp...@fadetoblack.me.uk>
Subject Re: syntax vs. style
Date Mon, 27 Mar 2006 13:08:38 GMT
>>>>>
Instead of using MP2 syntax, etc, we're still using:

    print "Content-type: $type\n\n";
    print "blah";

and in sending redirects, we use stuff like:

    print "Location: $url\n\n";


Is this a problem or is it just bad style?

What reasons are there to continue our port to use  the correct response
handler syntax, etc?
<<<<<

It's slightly slower. Effectively those headers have to be re-parsed by 
Apache::Registry. Another example is that $r->print is faster than a plain 
print.

Although Apache::Registry gives a good speed boost by itself, you need to 
make use of the mod_perl API to actually get the best out of it.

The next step from there is not using Apache::Registry at all, but putting 
mod_perl handlers into their own modules/packages. However there's more of a 
change here to other ways of working - for example you need to restart 
server to introduce code changes.

Carl


Mime
View raw message