in reply to Re: Using a different module version than the one installed
in thread Using a different module version than the one installed

There's actually two directories that need to be added to @INC, the one that allows it to locate the .pm, and the one that allows it to locate the .so.

Not in my experience.
If you add a single location to @INC that will locate the .pm file, then that's all you need to do - assuming that you've located the .so in the location (relative to the .pm file) where perl will look for it.
Of course, if you've placed the .so file in some other location (where perl won't look for it) then you will need to add a second path to @INC that will enable the .so file to be found by perl.

I guess you are referring to the latter scenario.

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: Using a different module version than the one installed
by ikegami (Patriarch) on Sep 02, 2022 at 17:15 UTC

    Yeah, nevermind. Both the pm and so are installed in the arch dir. I was confused. The error actually suggests an incorrectly installed module.

    That said, it is usually needed to add both the lib and arch dirs (because there are some modules in one and some modules in the other), and use lib adds both.