BooK has asked for the wisdom of the Perl Monks concerning the following question:
In fact I have in fact two questions in one...
1) I am in the process of writing a CGI script that would be run quite often, and would need only a few of the many possibilities provided by CGI.pm (mostly param and header)... And I heard that using CGI.pm can quite slow down a script... Would use CGI /:cgi/ help, or should I rewrite the few bits I need?
2) This script will have some very different behaviors depending on the parameter the user feeds to it... Since it's CGI (no mod_perl yet), would something like
help? It should be quicker than to parse and reparse all the (mostly useless) subs every time, shouldn't it?if($do eq 'this') { require This } else { require That }
Thanks for your comments.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: require() on the fly
by chipmunk (Parson) on Jan 16, 2001 at 07:03 UTC | |
|
(Ovid) Re: require() on the fly
by Ovid (Cardinal) on Jan 16, 2001 at 05:16 UTC | |
|
Re: require() on the fly
by AgentM (Curate) on Jan 16, 2001 at 04:55 UTC | |
by BooK (Curate) on Jan 16, 2001 at 05:10 UTC | |
by AgentM (Curate) on Jan 16, 2001 at 05:18 UTC |