cpan

Is it possible to manually include a CPAN library in a Perl script?

依然范特西╮ 提交于 2019-12-10 12:22:52
问题 The situation I am in is that I have written a perl script which uses the CPAN library XML::Simple and tested in an environment which has the ability to install the necessary CPAN library. However the environment which the script must be run in does not have the permissions to install CPAN libraries. I was wondering if there is some manual way to include the Simple.pm file with my script and include it in the directory with the script? I have tried using 'use' and 'require' to no avail. Any

Does CPAN installing of new modules impact Perl-CGI applications on same live production server?

江枫思渺然 提交于 2019-12-10 11:17:37
问题 I have some Perl/CGI programs on a CentOS Linux webserver. I wish to write further applications that require Perl modules not currently installed. Does running CPAN on the same live production server impact these programs (which currently don't use the modules, obviously) in any way? 回答1: There's one possible way that it could have an effect. If the modules you are installing require newer versions of modules that you are already using, then it's possible that these newer versions could

How can I 'use' specific version of a perl CPAN module?

我的未来我决定 提交于 2019-12-10 04:17:25
问题 I have a lot perl code that does different things in test and production, and I want to lock my code to specific versions of CPAN modules in case there are some changes to some of them in the future which may possibly break my code. So I want to use specific versions of all the modules I use. By use I mean use XML::Smart 回答1: To use specific module refer only use only MyModule => 0.30; Also to print error if module version you want is above to currently installed one You can say use XML:

cpan ignores makepl_arg and mbuild_arg

随声附和 提交于 2019-12-09 22:39:29
问题 I followed the instructions in the most voted answer to this question How can I install a CPAN module into a local directory?, which basically says that I can configure CPAN to install modules locally with: % cpan cpan> o conf makepl_arg INSTALL_BASE=/mydir/perl cpan> o conf commit cpan> o conf mbuild_arg '--install_base /mydir/perl' cpan> o conf commit However, when I try % cpan % install List::Gen My installation fails (it looks like CPAN still tries to install on a system path). Why? cpan

How do I use cpanminus with a local CPAN::Mini?

我是研究僧i 提交于 2019-12-09 17:46:28
问题 I've created my own local copy of CPAN with minicpan and managed to reconfigure cpan to use it - Fantastic! ..but how would I go about using it with cpanminus? 回答1: This should be possible using --mirror-onlyoption. For example: cpanm --mirror ~/minicpan --mirror-only 来源: https://stackoverflow.com/questions/8139088/how-do-i-use-cpanminus-with-a-local-cpanmini

Where can I find a concise guide to converting an existing CPAN module to use Dist::Zilla?

只谈情不闲聊 提交于 2019-12-09 17:46:22
问题 I have read, at various times, both the documentation and a number of blog posts on Dist::Zilla. I have never felt confidence in my understanding of it. In response to another question, @Ether raised the possibility of converting Crypt-SSLeay to use Dist::Zilla . So, where can I find a concise guide showing me how to convert an existing CPAN module to use Dist::Zilla ? Does the question even make sense? Update: The Makefile.PL for Crypt-SSLeay does a lot of work (a lot of it seems unnecessary

How do I install deps for CPAN module without installing it?

坚强是说给别人听的谎言 提交于 2019-12-09 13:17:39
问题 This is a follow-up to my previous question about developing Perl applications. Let’s say I develop an application as a CPAN module using Module::Install . Now I upload the code to the production server, say using a git push , and I would like to install the application dependencies listed in Makefile.PL . If I simply run cpan . , the thing tries to install the application like a regular Perl module, ie. starts to copy the modules and documentation to standard Perl directories all over the

What does Perl do when two versions of a module are installed?

走远了吗. 提交于 2019-12-08 18:44:56
问题 I don't have root access on a remote box I'm working with, so I'm using a combination of cpanm and local::lib as described here to install CPAN modules to my local directory on the box. Using cpanm, I assume cpanm Module::To::Update would install the newest version of the module in my local library. Apparently, I don't need root access to upgrade my modules with CPAN, as I just tried it, and the upgrade went swimmingly. However, I'm still curious which version of the module Perl will use: the

Remove Perl modules from CPAN on Mac

白昼怎懂夜的黑 提交于 2019-12-08 09:47:55
问题 As far as I know it is required to run CPAN with sudo on Mac sudo perl -MCPAN -e shell to install new modules. Theoretically, a module can be removed by deleting it from the Perl folders. My question is: Where are Perl modules put when installed from CPAN with 'sudo' and without 'sudo'? I installed BioPerl both ways and it seemed to work. Did I mess anything up by installing it with sudo and without? Thank you for a little help in the confusing Perl world. 回答1: You can see where a module got

Using perl within Objective-C?

混江龙づ霸主 提交于 2019-12-07 11:00:35
问题 CPAN has a ton of very useful libraries. Outside of porting them to Objective-C, is there is method to embed perl code in Objective-C on iOS? I am particularly interested in using Spreadsheet::Read to read Excel file data (and no, I don't want to force users to re-save their files as CSV). 回答1: Have you read perldoc perlembed, which documents how to embed perl in a C program? 回答2: Run the perl script with NSTask(). 来源: https://stackoverflow.com/questions/5533289/using-perl-within-objective-c