Eternal Startup Is the Price of Elegance

mako132 on 2002-06-20T00:18:10

Take

use strict;
use CGI qw/:standard/;
use CGI::Carp qw/fatalsToBrowser/;
use IO:Socket;
use GD;
use XML::Simple;

add 4 lines of code. What do you get?

One dog-slow CGI. You can just hear Apache groan. And I haven't added the DBI code yet :-0


mod_perl!

gav on 2002-06-20T01:44:26

That's why I use Apache::Registry and mod_perl. I basically write CGI scripts without the startup time :)

A recent project used a total of 9 modules in the main script: CGI, CGI::Carp, File::Slurp, Storable, Apache::Session, Date::Calc, Digest::MD5, Mail::Sendmail, HTML::Template, and DBI. Other parts of it used MIME::Lite, Mail::Bulkmail, Parallel::ForkManager, Email::Valid, Mail::MboxParser, Mail::Address, and Email::Find. Wow! That's not including the dependencies of these module either.

That's why I love perl. Without CPAN you're just banging your head against the wall :)

p.s. big thanks to the authors of the above modules.

PPerl

Matts on 2002-06-21T15:27:57

You should check out PPerl. It's perfect for just this kind of thing. And all you need to change is your shebang line.