#loops through required modules and installs them if missing #I've gotten into the habit of setting this on all my scripts, prevents weird path issues if the script is not being run by root This is what I do in some scripts on an Ubuntu (or debian server) #!/usr/bin/perl Seems like you've already got your answer but I figured I'd chime in. Print the script version and CPAN.pm version. Recompiles dynamically loaded modules with CPAN::Shell->recompile. List the modules by the specified authors. Module name, local version, and CPAN version. Modules locally installed but have newer versions on CPAN). This prints one line for each out-of-date module (meaning, Show the Changes files for the specified modules Shows the primary maintainers for the specified modules Here's a summary of the current features (which might be newer than the one that comes with CPAN.pm and perl): -aĬreates the CPAN.pm autobundle with CPAN::Shell->autobundle. There are several other things that you can do with the cpan tool as well. This works on Unix, Mac, and should be just fine on Windows (especially Strawberry Perl). If you don't give it any arguments it starts the CPAN.pm shell. INSTALL PERL MODULE INSTALLJust give it the modules that you want to install and let it do it's work. This means that you can do the same thing as every other Perl user when it comes to installing modules, and things tend to "just work" a lot more often.Ī couple of people mentioned the cpan utility, but it's more than just starting a shell. It also includes some hard-to-compile Perl modules with their external C library dependencies, notably XML::Parser. Its dependency free (can bootstrap itself) and requires zero. This is a version of Perl that comes packaged with a pre-configured CPAN shell as well as a compiler. cpanm from App::cpanminus is a script to get, unpack, build and install modules from CPAN. INSTALL PERL MODULE UPDATENowadays, when I'm on a system with an old CPAN, the first thing I do is update the shell and set it up to do this so I can do most of my cpan work as a normal user.Īlso, I'd strongly suggest that Windows users investigate strawberry Perl. If you have an old CPAN shell, simply install the new cpan ("install CPAN") and when you reload the shell, it should prompt you to configure these new directives. This is much safer, since it means that tests don't run as root. That used to be necessary to install into the system directory, but modern versions of the CPAN shell allow you to configure it to use sudo just for installing. I note some folks suggesting one run cpan under sudo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |