cpan

I upgraded SVN::Core via CPAN and now git-svn doesn't recognise http:// URLs.

Hi all, I was trying to update version of Subversion used by git svn and so I ran the following command. > cpan SVN::Core It appeared to work; however, now git svn doesn't recognise HTTP URLs! > git svn rebase Bad URL passed to RA layer: Unrecognized URL scheme for 'http://<...>' at /opt/local/libexec/git-core/git-svn line 226...

Stopping Perl XS modules from silently falling back to pure-perl

It seems some (many?) modules on CPAN are partly implemented in C using XS, and can fall back to a pure-perl implementation if necessary. While this is smart, it can obviously hurt performance, and I would like to know it happens so I can fix the problem. Is there a general way of stopping or detecting this type of fallback? For an exa...

Why can't I install Perl's File::Find::Rule?

perl -MCPAN -e'install File::Find::Rule' CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Mon, 13 Sep 2010 08:41:13 GMT Running install for module File::Find::Rule Running make for R/RC/RCLAMP/File-Find-Rule-0.32.tar.gz CPAN: Digest::MD5 loaded ok Checksum for /root/.cpan/sources/authors/id/R/RC/RCL...

How do I update all my CPAN module to their latest versions?

I know this is really simple... sorry :) ...

How do I install CPAN modules while using perlbrew?

I have started using perlbrew and installed perl-5.12.2. I understand I need to re-install my CPAN modules, so I switched to my new perl version (perlbrew switch perl-5.12.2 and hash -r), verified the switch was successful (perl -v) then tried installing some module (File::Copy::Recursive using cpan. However, cpan says `File::Copy::Rec...

How can I install Perl modules without root privileges?

I am on a Linux machine where I have no root privileges. I want to install some packages through CPAN into my home directory so that when I run Perl, it will be able to see it. I ran cpan, which asked for some coniguration options. It asked for some directory, which it suggested ~/perl "for non-root users". Still, when I try to install ...

How do I install the latest BioPerl version when using perlbrew?

I'm using perlbrew and I would like to install the latest bioperl version. Should I use cpanm or git? If git - do I just install as usual (AKA git clone ... then make and build), or should I do anything special? UPDATE Specifically, I'm not sure I understand the following expert from BioPerl Using Git manual: Tell perl where to fi...

How can I install `Thread::Pool` from CPAN?

I'm using cpanm to install Perl modules, but I can't install Thread::Pool for some reason: $ sudo cpanm Thread::Pool fails and the log file says: cpanm (App::cpanminus) 1.0012 on perl 5.010001 built for i486-linux-gnu-thread-multi Work directory is /home/dave/.cpanm/work/1284831891.13606 You have make /usr/bin/make You have LWP 5.834...

Is there some lightweight user preference support in CPAN?

I want to have my Perl program support both Win32 Registry and the similar feature in Linux. GConf maybe a good idea, but it's too heavy. Is there some lightweight user preference support in CPAN? ...

How do you read CPAN changelogs?

Since discovering perlbrew, I'm a happy CPAN user. But what I have never figured out is how to read changelogs of modules. For example, when looking at the outdated ones with "r" in the CPAN shell, I'd like to easily inspect the changelog to decide whether to upgrade or not. Of course I can download the module, unpack it, and hunt aroun...

How can I set library and include paths for Makefile.PL for a single installation?

How can I tell CPAN to give Makefile.PL one specific argument in one specific installation? Specifically. I want to install XML::LibXML, and apt-get installed the library to /usr/lib/libxml2.so.2.6.32. Makefile.PL has problems with that and tells me: using fallback values for LIBS and INC options: LIBS='-L/usr/local/lib -L/usr/lib -l...

How can I implement a simple IRC client in Perl?

I'm working on a tool that needs to send IRC messages to an internal IRC channel. This isn't a constantly running program, but rather a tool that will be invoked occasionally and needs to be able to notify the channel with a couple of messages when it's invoked. I looked at Net::IRC, but it's been dead since 2004. So I looked at the alt...

How do I make pQuery work with slightly malformed HTML?

pQuery is a pragmatic port of the jQuery JavaScript framework to Perl which can be used for screen scraping. pQuery quite sensitive to malformed HTML. Consider the following example: use pQuery; my $html_malformed = "<html><head><title>foo</title></head><body>bar</body></html>>"; my $page = pQuery($html_malformed); my $title = $page->...

How can I revert to the previous Perl setup after installing Bundle::CPAN?

After installation of latest Bundle::CPAN, I realized that certain legacy code will not run in this latest version. I wish to remove (and not just unlink) this latest version and revert back to using the old version. How can I do that? ...

Is there a Perl module for converting YAML files into Moose objects dynamically at runtime?

I've been trying to find a Perl module that converts a YAML file into moose objects without having to pre-declare the structure as you seem to need to do when using MooseX::YAML. Does anyone know of such a module (or script)? ...

What is the recommended way of doing date arithmetics in Perl?

What is the recommended way of doing date arithmetics in Perl? Say for example that I want to know the date three days ago from today (where today = 2010-10-17 and today - 3 days = 2010-10-13). How would you do that in Perl? ...

Should I use an alternative from CPAN to replace Frontier::RPC2?

I have been using Frontier::RPC2 for my XML-RPC server, with Frontier::Client on the client side... but have noticed these modules have not been maintained recently. Discussion at the bottom of this page mentions some fresher alternatives on CPAN. What would the pros and cons of these be? I honesty don't have an immediate need to swit...

How can I get App::cpanminus to work?

I have just installed a fresh copy of ubuntu 10.10. I installed perl 5.12.2 following brian d foy's recommended outline and then installed cpanminus by invoking curl -L http://cpanmin.us | perl5.12.2 - --sudo App::cpanminus. Now, cpan5.12.2 works fine, but whenever I try to install a module using cpanm5.12.2 it fails finding it. e.g.: ...

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

I notice that XML::RSS::Parser hasn't been updated since 2005. Is this still the recommended library for parsing RSS or Atomtom? Is there a better one or a better way? ...

How do I install a CPAN module site-wide while local::lib is present?

I've recently set up a new system and wanted to install Padre to check it out. The Padre install instructions specifically said to install local::lib, so I did so (although I've never had need of it before). I then went on my way installing several other modules, running CPAN from my normal user account with sudo to handle the root-req...