Can you show us a recursive listing of the directory where you're storing the modules you want to use? An ls -R
could help us figure out if you have the right paths.
When you use the -I
switch, you have to ensure you get the right path in there. If you use a module:
use Some::Module;
Perl actually looks for:
$lib/Some/Module.pm
The $lib
is one of the directories in @INC
. Another way to say that though, is that if the particular directory is not in @INC
, Perl isn't going to look in it. This means that Perl won't automatically look in subdirectories for you
If your module is not at that location, Perl is not going to rummage around in that $lib
to look for it. Your XS module is probably not stored like that. It might have a Perl version and archtype in the path, so you might find it in:
$lib/5.10.1/darwin-2level/Some/Module.pm
You need to add those paths yourself if you are using -I
.
However, you can load modules on the command line. It's much easier to use lib
, which adds the extra directories for you:
perl -Mlib=/path/to/lib ...