Ok. Then I guess I need to start more from the bottom. Where can I find documentation about 'librarizing' my code? All I was doing was really using SUBs, some returning value, some not to avoid repeated code. And, will using this AutoLoader, even if I have everything scattered in a whole bunch of files, will Perl still not open the files? How will it know what is inside each? Or will it first parse through it and skip compiling code when not needed (I am guessing it indexes where functions are). But what I really want is to not lose any time. Will I be able to accomplish not opening up all these library files? If I am breaking up code, it wouldn't be too useful to have it on many files since I would still force open/close on a require, right? I would just not compile it. I am looking for the fastest way to do it. I want to know if it's really worth it to cut it off into separate file pieces.
Regards,
Javier Moreno
==============
Softtek/GXS
EFS NearShore - TradeWeb 2nd Tier
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
- Sherlock Holmes
-----Original Message-----
From: Randy W. Sims [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 7:18 PM
To: Moreno, Javier (GXS, Softtek)
Cc: Activeperl (E-mail)
Subject: Re: Performance question
On 1/15/2003 2:16 PM, Moreno, Javier (GXS, Softtek) wrote:
> Hi all,
>
> I have a program that calls via require statements several other files in
> order to avoid repeated code. This code is on a production web environment
> that may have hundreds of users accessing the same code at the same time.
> The external files of code (which I will call library files) have numerous
> sub statements (functions) inside of them. Now, in order to maintain this
> codebase better one idea was to break up every single function into its own
> file, so that when modifying such function, only one file was deployed,
> thus, reducing QA time. So, basically I want to know if I can expect a
> performance hit if I open up several files, since they will all be called
> within the program.
The documentation for the standard AutoLoader and AutoSplit modules may
help answer your questions. They help you organize your code so that
subroutines are loaded on demand.
HTH,
Randy.
