in reply to Linking CPAN modules to specific library

There may be two separate problems. One, how the makefile flags and environment influence which libraries are linked against. See ld. Second, how the system finds libraries at runtime. See

In any case, it looks like you are dealing with a mess. How to best clean it up depends on what options you have available as an admin.