in reply to A simple library question

Another way:
#!/usr/bin/perl -w BEGIN { push @INC, 'path'; } use strict; use modulename;
Update: thanks gellyfish for pointing out that this works as long as the included modules do not depend on XS components or autosplit subroutines. In that case, it would be necessary to push the architecture specific directories as well

Replies are listed 'Best First'.
Re^2: A simple library question
by gellyfish (Monsignor) on Jul 14, 2004 at 11:21 UTC

    As the manpage says this is *almost* the same as use lib but the disadvantage is that it does not add any architecture specific directories under the path you have used, thus it is likely that any module with XS components or autosplit subroutines that have been installed there will not work unless you add the proper sub directories manually.

    /J\