On 1/22/06, Ken Perl <[EMAIL PROTECTED]> wrote:

> May I import all modules located in a directory called
> '/opt/myperlmodules' in Begin block like this?

What happened when you tried it?

> $myModules = "/opt/myperlmodules";
> lib->import($myModules);

I don't think it will work, but maybe you have a different version of
Perl installed on your machine than I have in my brain. :-)

Maybe you're doing something quite unusual, but... It's probably not a
defensible programming technique to use whichever modules are found in
a given directory, for much the same reason that recipes seldom
suggest choosing ingredients by location. "Begin with the rightmost
box on the shelf with the breakfast cereal. Next, stir in half of the
largest container on the bottom shelf in the refrigerator. Add a
spoonful of every third spice from the second row of the spice
rack...."

Modules: Ask for them by name.

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
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