in reply to Changing module install path

If using taint removes directory from @inc, that location was the overide instal loc

Replies are listed 'Best First'.
Re^2: Changing module install path
by fkento (Acolyte) on Mar 23, 2016 at 13:12 UTC

    For example, if I run this:

    perl -T -MNet::DNS -e'print "Hello World\n"'

    I get this error

    Can't locate Net/DNS.pm in @INC (@INC contains: /usr/local/lib64/perl5 + /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5 +/vendor_perl /usr/lib64/perl5 /usr/share/perl5).

    But if I run it without the -T option it works fine

    I think this is because the Net::DNS module is installed in /root/perl5/lib/perl5/ and it should be installed somewhere else. But I don't know how to change it.

    Thanks, Kent

      See the -I command line switch in perlrun, or set @INC from within your script (perlvar or use lib;).

        The problem is I want to run scripts written by other people and I don't want to have to modify the include path every time. I just need to know how to install modules under /usr instead of /root.

        Thanks