
pozvanete
Novice
Mar 22, 2009, 9:54 AM
Post #1 of 4
(870 views)
|
|
Need help about preventing overloading a script!
|
Can't Post
|
|
Hi all, I am trying to figure out the best organisation of usage a custome purpose module library. I have no experience on this end so please. The number of modules in this library will change, mostly increase. The user of the main script will have a choice to add them. If I place the entire 'use lib' - will this be a burdain on the script if the modules become 100? Is the 'if' statement prevents that. What is the common practice! advice appreciated. I hope the example bellow is clear. &1 and &2 are subroutines in the script. if($content eq '1'){&1;} elsif($content eq '1'){ &2; } elsif($content eq 'other3'){ use other3 ; &other3() ; } elsif($content eq 'other4'){ use other4 ; &other4() ; } elsif($content eq 'other5'){ use other5 ; &other5() ; } ...........................................................
|