eyal edri wrote:
> As you probably know the more modules use in your script the more time
> it takes to load..
> 
> I've just finished a script (more like a program) which uses lot of perl
> modules and has more than 2000 code lines.
> Each time i run it, it takes more than 15 seconds to load.. :(
> 
> I've read a few aricles about all sorts of methos (auto something..) but
> it was all confusing..
> anyone know a simple way to doing this?
> 
> my scripts starts like this:
> 
> use File::Copy qw(copy);
> use Net::Domain qw(hostname hostfqdn hostdomain);
> use File::chmod;
> use Config::IniFiles;
> use File::Remove qw(remove);

That takes about .359 seconds for me to load on Windoze.  I don't
think that's your problem unless you're running on a 8080 with a
floppy disk.

> i've also tried using a sub :
> 
> sub load_module {
>     eval "require $_[0]";
>     die if $@;
>     $_[0]->import(@_[1 .. $#_]);
> }
> 
> to try load the specific module at the right time and not in the
> begining....

With what results ?  Any improvement ?

_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to