in reply to How to install (download) CPAN module on the correct path.

The /home/eankuls/.cpan/build/* paths are temporary directories used by CPAN while it's building modules, but before installing them. Don't use these paths in production code because CPAN could delete them without asking you. (They're temporary!)

If you're having trouble with permissions installing CPAN modules, then consider using local::lib to establish a location in your own home directory for installing modules. As it will be within your home directory, there should be no permissions problems. local::lib also works very nicely together with cpanminus, which is an alternative to the normal CPAN command-line client.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^2: How to install (download) CPAN module on the correct path.
by Ankur_kuls (Sexton) on May 01, 2014 at 11:11 UTC

    I installed local::lib module and then tried to install Net::SFTP, but it is still showing the same error.

    an't locate Net/SFTP.pm in @INC (@INC contains: /etc/perl /usr/local/l +ib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share +/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_pe +rl .) at ankur_ftp.pl line 13.

    Am i skipping any step? I mean i Just installed local::lib module. I don't know how this @INC array will start considering those paths where my modules are installed. Could you please tell me in details.....thnx a lot..

      "I installed local::lib module and then tried to install Net::SFTP"

      How? As I've asked before, be specific. You say you tried to install Net::SFTP but don't show how you tried to do this, or what when wrong. Did you read the link to the local::lib documentation I gave you? It looks like you haven't updated your code to reflect that fact that you want to use local::lib. Again examples in the documentation.