On Wed, 9 May 2001, Tirthankar C.P wrote:

> Folks, how do I load extra modules? I got Date::Manip today, and I know I
> should be putting it in the search-path of perl (@INC ?), but how do I do
> it? Can I get a small code snippet?
>
> I do not have su privileges on the machine I work, and would like the
> search-path to have my modules dir, $HOME/perlmodules in it.

Be careful -- you can't just move modules into a directory and expect them
to work, since some depend on loading native code shared libraries.

If you have a module you want to use, you can do something like:

use lib '/path/to/modules'; #MyModule.pm is in this directory

use MyModule;

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Before destruction a man's heart is haughty, but humility goes before honour.
                -- Psalms 18:12


Reply via email to