in reply to Dynamicaly loading modules
This also gets around the fact that use() is evaluated at compile-time. However, with that said, it would probably be nicer to use require() like somy $include = shift @ARGV; eval "use $include";
I believe this does essentially does the same thing as use() but gets around the eval() hack and is more tailored towards dynamically loading modules.my $include = shift @ARGV; require $include; import $include;
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Dynamicaly loading modules
by Sinister (Friar) on Feb 13, 2002 at 13:19 UTC | |
by Sinister (Friar) on Feb 13, 2002 at 15:20 UTC | |
by perrin (Chancellor) on Feb 13, 2002 at 17:29 UTC |