SPUG: Is there some other recommended replacement for CGI.pm with Apache2?

Cantrall, Christopher W christopher.w.cantrall at boeing.com
Thu Sep 18 13:00:57 CDT 2003


I have repeatedely heard that CGI.pm only compiles what is needed, leaving the rest of the monster outside the castle gates, unable to slow down the festivities inside the Castle Script.  See the linked docs and discussions for more info, but suffice it to say that all of CGI.pm is not loaded every time your script starts.  

I don't know if this is what Adam meant by "resource waster", or what Jerome meant by "isn't nearly the monster that it's reputed to be", but it's a complaint that I've heard many times, namely, loading 'that huge beast into my simple form script will slow the whole server'.  Adam, if I've missed your point, I'm sorry and could you clarify. :)


http://search.cpan.org/author/LDS/CGI.pm-3.00/CGI.pm#PRAGMAS
See the -compile section for this sentence: "This causes the indicated autoloaded methods to be compiled up front, rather than deferred to later."  

http://perlmonks.org/index.pl?node_id=267364 
"That's because, by default, CGI only compiles a function when it's requested."

Cheers.

____________________________________________
Chris Cantrall
Structural Engineer, 767 Fuselage, Boeing
Christopher.W.Cantrall at Boeing.com
chris at cantrall.org
http://perlmonks.org/index.pl?node=Louis_Wu



-----Original Message-----

<snip>

Fred Morris wrote:
> Just wondering if maybe I should be moving to something else.. if there is
> anything else. Basically I use CGI.pm to get parameters and to emit
> response headers, and that's about it.

Adam Monsen wrote:
CGI.pm is a resource waster and the code looks a bit scary, but it seems 
to be quite an axiom, probably because it has the most desirable 
namespace. :)

<snip>

Jerome O'neil wrote:
CGI.pm isn't nearly the monster that it's reputed to be.  It might be a bit
heavyweight for simple query term extraction, but for general purpose use,
its the best thing going.



More information about the spug-list mailing list