cpan

How to use a CPANPLUS autobundle to update a new version of Perl?

纵饮孤独 提交于 2019-12-05 15:17:44
问题 I have Perl 5.13.4 with a large collection of installed CPAN modules. I have just compiled Perl 5.14.0. I'd like to install (recompile) all the modules in 5.13.4 into 5.14.0. I can/have generated a bundle of the installed modules with 'cpanp' and the 'b' option; I now have a file ~/.cpanplus/5.13.4/dist/autobundle/Snapshot_2011_05_18_00.pm . What is the command to use in the 5.14.0 version of 'cpanp' that will go through that snapshot bundle and ensure 5.14.0 has all those modules installed?

Installing XML::Parser requires expat.h

你说的曾经没有我的故事 提交于 2019-12-05 13:55:34
I'm working on a project that requires all third-party (read: CPAN) perl modules to be installed in a perforce repository, so that any code that depends on them can be successfully run without anyone else needing to manually install them. I ran into an issue though when trying to install XML::Parser. I use cpanminus to install my CPAN modules, so I ran cpanm -L . XML::Parser in the desired directory (this has worked before with other modules) and got the error: Expat.xs:12:19: error: expat.h: No such file or directory I'm used to using Ubuntu and apt-get, but at work I have to use RedHat and I

How can I tell cpan to change the target for the module installation?

廉价感情. 提交于 2019-12-05 13:42:54
When I installed perl from the source the first nice surprise was that without doing something all module installed from now on were available to the new perl. Since I didn't find one module on cpan that comes with my OS I have to use for some scripts the onboard-perl. For one of these scripts I would like to install Text::Format or Text::Autoformat (didn't find the docu for that module on cpan). My question: how can I tell cpan to install the module this one time for the OS-distro-perl? Each Perl installation has its own idea of where libraries should "live", which the CPAN module uses as a

What's the best library for parsing RSS/Atom in Perl?

戏子无情 提交于 2019-12-05 13:11:52
问题 I notice that XML::RSS::Parser hasn't been updated since 2005. Is this still the recommended library for parsing RSS or Atom? Is there a better one or a better way? 回答1: I'm not sure it's ever been the "recommended library". If I know which kind of feed I need to parse, I use XML::RSS or XML::Atom as appropriate, but if (as is more likely) I just know it's a web feed, I use XML::Feed. Adding an example of using XML::Feed as requested.. use XML::Feed; my $feed = XML::Feed->parse(\$string

CPAN GD module install failure using Cygwin

北城以北 提交于 2019-12-05 09:02:59
I have been trying to troubleshoot why CPAN GD module fails to install using Cygwin for 2 days now. Any help is much appreciated. Thanks! cpan install GD Going to read '/home/xxxxxxxxxx/.cpan/Metadata' Database was generated on Sat, 27 Dec 2014 12:17:02 GMT Running install for module 'GD' Running make for L/LD/LDS/GD-2.56.tar.gz Checksum for /home/xxxxxxxxxx/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok CPAN.pm: Going to build L/LD/LDS/GD-2.56.tar.gz Configuring for libgd version 2.1.0. Checking for stray libgd header files... ** WARNING: found gd.h header file in /usr/include/gd.h, but

Is there a Perl module to monitor an email queue?

ぐ巨炮叔叔 提交于 2019-12-05 07:18:59
I'm working on an issue tracking system and would like the application to handle email replies. That is, I would like a script that can monitor an email queue and perform some action based on the email contents. It should then be able to delete the email, etc. I currently use MIME::Lite to send email, and I can handle writing the script etc. (read: I'm not new to Perl). However, I have no idea what modules are good for doing this particular task. I'd like to get started on this as quickly as possible so I hope to narrow my search space for possible modules. In case you need to know, the

perl “…/config.h, needed by `Makefile'” not working after OSX Lion upgrade

与世无争的帅哥 提交于 2019-12-05 06:12:58
SOLVED. See at bottom. Just upgraded to OSX Lion and trying to get my Perl install running again: sudo /usr/bin/perl -MCPAN -e 'install "MODULENAME"' with any value of MODULENAME that I tried (e.g. JSON ) produces: ... Checking if your kit is complete... Looks good Writing Makefile for JSON make: *** No rule to make target `/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/config.h', needed by `Makefile'. Stop. MAKAMAKA/JSON-2.53.tar.gz /Developer/usr/bin/make -- NOT OK I can't find anything resembling config.h anywhere, the directory exists though ... Not even this works: /usr/bin

How do I write an HTTP server in Perl?

一笑奈何 提交于 2019-12-05 05:25:47
Is there a webserver or HTTP server module in the Perl standard library or in CPAN or elsewhere? I guess I'm looking for the equivalent of Python 3's http.server module. Thanks! In addition to HTTP::Daemon , I would recommend taking a look at HTTP::Server::Simple which indeed is very easy to use. See HTTP::Daemon Pedro Silva Here are a few more: Catalyst::Engine::HTTP Net::Server 来源: https://stackoverflow.com/questions/1904420/how-do-i-write-an-http-server-in-perl

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

孤者浪人 提交于 2019-12-05 05:18:09
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 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::Smart v1.6.9; or use XML::Smart 1.6.9; or for backward compatibility use XML::Smart 1.006_009; With reference

CPAN Requirements File

送分小仙女□ 提交于 2019-12-05 02:16:38
With pip you are able to create a requirements file to specify which libraries to install. Is there an equivalent for perl modules using CPAN? I came across ExtUtils::MakeMaker, but this seems like the make file is for each module specifically. I guess to try and give a better idea of what I am asking is if there is a way to do something like cpan install -r requirements.txt and then specify which modules to install in that requirements file. Thanks in advance! I think Carton is what you're looking for. To start using Carton, install it. Then create a cpanfile with your dependencies: require