perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Foo Ji-Haw <>
Subject Re: syntax vs. style
Date Mon, 27 Mar 2006 06:24:09 GMT

> I've fixed a lot of old CGI scripts over the past year and all new 
> stuff to work in our MP2 environment and everything seems to be 
> running excellent -- I mean GREAT, really.
Yes. I've never looked back myself. :)

If you're going all the way into modperl (arguably depending on your 
needs), you may want to use packages instead of a file-per-uri method. 
That means you use the following registration:

<Location /scripts/>
                SetHandler perl-script
                PerlResponseHandler Your::Package::Here

Check out for a sample package that uses this model.

And using this model, you can use the following to set your content handler:
> Is this a problem or is it just bad style?
I don't think it's bad style. But if you're just using modperl to 
accelerate your perl applets, you should try this method instead for 
setting content type:

$q->header(-type => 'text/html');

Where $q is an instance of CGI (check out perldoc for details).

View raw message