in reply to Re: Upgrading XS module to later version
in thread Upgrading XS module to later version

Yes, using sudo apt-get install libdatetime-perl seems a good idea, especially for a basic module such as DateTime, which seems a useful thing to have around. Not so sure I want to clutter /usr with every Cpan Module I fancy trying out and might never use again. So I did that, and then got:

cpan[1]> m DateTime CPAN: Storable loaded ok (v2.41) Reading '/usr/local/CPAN/Metadata' Database was generated on Tue, 16 Jun 2015 21:53:20 GMT Module id = DateTime CPAN_USERID DROLSKY (Dave Rolsky <autarch@urth.org>) CPAN_VERSION 1.19 CPAN_FILE D/DR/DROLSKY/DateTime-1.19.tar.gz UPLOAD_DATE 2015-05-31 MANPAGE DateTime - A date and time object INST_FILE /usr/lib/perl5/DateTime.pm INST_VERSION 1.06
So it had actually installed v1.06 (presumably the latest Ubuntu had got around to) although it knew that a later v1.19 existed.

Fortunately, my application did not care about that version, but promptly declared that what it really wanted was DateTime/Format/Mail.pm, which then downloaded via Cpan; my application then ran, and hit a bug which I shall now have to sort out.

Replies are listed 'Best First'.
Re^3: Upgrading XS module to later version
by Anonymous Monk on Jun 19, 2015 at 16:13 UTC
    what it really wanted was DateTime/Format/Mail.pm

    sudo apt-get install libdatetime-format-mail-perl

    Those module versions will always lag behind the current ones, sometimes significantly, but they should always play nice with Ubuntu's Perl installation (that's the whole point). If you want to install a bunch of custom CPAN modules, I'd recommend a Perl built just for that in /opt, where you can experiment and it can easily be clobbered and re-installed in case things do happen to get messed up. Either that, or install all modules locally, e.g. local::lib. A messed up system Perl can be tricky to pick apart and revert to a clean state. Also remember that there are Perl scripts that are part of other Ubuntu packages which rely on a working system Perl.