Moore, George T. wrote:
It depends on how you are using your scripts. The most "expensive"
aspect of the files is the IO used to read them from the hard drive they
reside on. If you are calling on the scripts multiple times and they
have to be read each time, rather than being cached in memory, then you
only want to read what is absolutely necessary. If one script always
calls another then you are probably better having the subroutines, which
would save IO.
-----Original Message-----
From: Hardly Armchair [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 4:40 PM
To: beginners-cgi@perl.org
Subject: Multiple .cgi scripts vs. one large script

Hello All,

I was wondering if it is more efficient (in terms of speed and processor

load) to have two different scripts of approximately the same size called to handle two different functions, or to have one large script handle all cgi functions using subroutines. Or perhaps these situations

are equivalent.

I apologize if I have just asked an unanswerable question.

At least as important is maintainability. If you have several scripts, then you have to maintain several scripts. That may be fine, but it may not. If you do go down the road of using one script, look into CGI::Application or Catalyst on CPAN.

Sean

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to