I have a script that uses modules that are external to the standard Perl library and would like to use them somehow. I do not have permission to install them in the Perl lib directory, and I was wondering if I could just use these external modules in my script directory.
I read about using FindBin, but it doesn't seem to work. Am I using it correctly?
Now I want to use 3 modules that I want to use (2 are directories). So let's say my script is in Dir1, then my modules will be in a subdirectory of Dir1 called Dir2.
So, if FindBin finds Dir1, then all I have to do is this?
use FindBin '$Bin'; use Dir2 "$Bin/Dir2"; use Dir2::SubDir_ofDir2_1::Module1; use Dir2::Module2; use Dir2::Module3;
My program works, but does nothing. Therefore, I am sure that it does not import modules correctly.
thanks
source share