Monday 11 January 2016

Perl - CPAN shell

Brief guide to setting up CPAN shell to easily install Perl modules.

    sudo perl -MCPAN -e shell

If this fails with error message "Can't locate local/lib.pm in @INC" or make not found, either way you may need to install supporting tools. In a debian world this is as easy as:-

    sudo apt-get install build-essential liblocal-lib-perl

Once in the Perl CPAN shell its a good idea to update the shell:-

    sudo perl -MCPAN -e shell
    install CPAN
    reload cpan

Finally to install a module such as Net::Telnet simply:-

    sudo perl -MCPAN -e shell
    install Net::Telnet

Thats all for now.

No comments:

Post a Comment

All comments made are subject to moderation.