He shares and helps engineering students and IT professionals in academics and career consulting. User Rating 5 3 votes. You may also like. Share your Thoughts Cancel reply. You can get into the CPAN shell with the old style: sudo perl -MCPAN -e shell or, on most newer systems, there is a 'cpan' command, so this command will get you to the shell: sudo cpan You typically have to use 'sudo' to run it as root, or use 'su -' to become root before you run it, unless you have cpan set up to let you run it as a normal user, but install as root.
Unless your install is very out of date this will not be a complete list. My 'r' always reports next to nothing because I upgrade compulsively. Which reminds me I haven't upgraded today, yet. The -r recompiles stuff. To get a list, try -a or download the latest sources and play with the new -l switch, added for just this answer. Why the sudo here? You may see many duplicates This will not give him what he wants. Wernfried Domscheit Wernfried Domscheit Thank you! Very useful. That is perhaps the most perl I've ever been taught with such a succinct expression.
Try the following command instmodsh. Simplest answer. Worked fine on our ancient Debian 6 server. This worked for me. Thanks for posting this. You should skim the excellent documentation that comes with Perl perldoc perltoc. Try man perllocal or perldoc perllocal.
Walter H Walter H 7 7 bronze badges. Nicholas Sushkin Nicholas Sushkin Call the script using - perl perlmod. Here is yet another command-line tool to list all installed. The code to do this looks like:! Randall 2, 1 1 gold badge 18 18 silver badges 21 21 bronze badges. The following worked for me. This only lists about 15 perl modules, instead of the that 'cpan -l' lists.
Haili Sun Haili Sun 3 3 silver badges 10 10 bronze badges. Henrik Henrik 2 2 silver badges 10 10 bronze badges. Why not? For Linux the easiest way to get is, dpkg -l grep "perl".
Yasiru G Yasiru G 6, 5 5 gold badges 19 19 silver badges 38 38 bronze badges. I'm not a perl expert but I have seen installed perl modules from above command. May be not the perfect answer here. YasiruG it only lists those that have been installed via packages; that's a minority in any installation. Most of them are installed via CPAN. AnandiG AnandiG 7 3 3 bronze badges.
Thank you for this code snippet, which might provide some limited, immediate help. A proper explanation would greatly improve its long-term value by showing why this is a good solution to the problem, and would make it more useful to future readers with other, similar questions.
Please edit your answer to add some explanation, including the assumptions you've made. Fred Wuerges 1, 2 2 gold badges 21 21 silver badges 42 42 bronze badges. I don't believe this answers the question. Using this suggestion, it could take someone quite awhile to go through module by module to discover which modules are installed or not. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. Install the app. Contact us. Close Menu. JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding. You are using an out of date browser.
It may not display this or other websites correctly. You should upgrade or use an alternative browser. Thread starter risc Start date Jan 2, Joined Sep 30, Messages One more for you guys. Any chance you can help me figure out why the 'make test' on 'Math: ari' is failing? Click to expand Joined Apr 16, Messages 2, My reason for not tyring to install gnuplot first is that the test failed before it got to that point.
0コメント