![]() This works well for me, maybe there is something here you can use. This is what I do in some scripts on an Ubuntu (or debian server)\n\n #!/usr/bin/perl\n\nuse warnings \nuse strict \n\n#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\n$ENV\n\n\n Activestate Perl: activestate provides a free Community version and one business Perl supported is used. Seems like you\'ve already got your answer but I figured I\'d chime in. The biggest difference between activestate Perl and strawberry Perl is that strawberry Perl contains more modules in cpan, so the installation file downloaded by strawberry Perl is more than 80 m, while activestate Perl is only about 20 m. Each line has three columns:\nmodule name, local version, and CPAN version.\n\n-L author \nList the modules by the specified authors.\n\n-h\nPrints a help message.\n\n-O\nShow the out-of-date modules.\n\n-r\nRecompiles dynamically loaded modules with CPAN::Shell->recompile.\n\n-v\nPrint the script version and CPAN.pm version.\n\n This prints one line for each out-of-date module (meaning,\nmodules locally installed but have newer versions on CPAN). Here\'s a summary of the current features (which might be newer than the one that comes with CPAN.pm and perl):\n\n -a\nCreates the CPAN.pm autobundle with CPAN::Shell->autobundle.\n\n-A module \nShows the primary maintainers for the specified modules\n\n-C module \nShow the Changes files for the specified modules\n\n-D module \nShow the module details. 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).\n\n If you don\'t give it any arguments it starts the CPAN.pm shell. Just 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.\nĪ 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. This is a version of Perl that comes packaged with a pre-configured CPAN shell as well as a compiler. Nowadays, 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.\n\nĪ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.\n\n This is much safer, since it means that tests don\'t run as root.\n\n 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. |