Discipulus has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks and nuns,

before submitting a bug to the wonderful people who maintain strawberry perl I ask here just in case i missed something obvious..

The fact hitting me is that I cant get cpan client to report correctly modules versions installed.

about cpanminus option

I know cpan is not the only client to access CPAN and cpanm is the preferred solution for many of us, but it seems it has some issues (even if distributed along the portable edition!) because of paths expressed à la unix and some other strangness like cpanm --self-upgrade failing.

the problem with cpan client

Working with freshly downloaded and unzipped strawberry version and launching the portableshell.bat that come with each strawberry portable edition, and working, for example, with SDL module I have the following:

---------------------------------------------- Welcome to Strawberry Perl Portable Edition! * URL - http://www.strawberryperl.com/ * see README.TXT for more info ---------------------------------------------- Perl executable: C:\right\path\strawberry-perl-5.26.0.2-64bit-portable +BIS\perl\bin\perl.exe Perl version : 5.26.0 / MSWin32-x64-multi-thread cpan> r SDL .. All modules are up to date for SDL

But with the non interactive call (I suppose it's the same program anyway):

cpan -D SDL SDL ---------------------------------------------------------------------- +--- (no description) F/FR/FROGGS/SDL-2.546.tar.gz (no installation file) Installed: not installed CPAN: 2.546 Not up to date Tobias Leich (FROGGS) froggs@cpan.org

All configuarations ( reviewed with o conf ) relative to working dirs ( build_dir cpan_home histfile keep_source_where make make_install_make_command patch prefs_dir ) are correct; absolute paths pointing to the current running version. Also @INC is correct for every portable distribution with strawberry prepended to it. The same for the PATH environment variable.

This happens with versions: strawberry-perl-5.26.1.1-32bit-portable  strawberry-perl-5.26.0.2-64bit-portable strawberry-perl-5.24.2.1-64bit-portable strawberry-perl-5.22.3.1-64bit-portable strawberry-perl-5.20.3.3-64bit-portable

Also happens:

cpan> r Not_Existing_Module .. All modules are up to date for Not_Existing_Module

What can I do? I missing something very simple? Thanks for the attention.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re: cpan client problem with strawberry portable
by soonix (Chancellor) on Nov 20, 2017 at 13:31 UTC
    Hi Lorenzo,

    I see the same with 5.24.0 32bit, however, I think SDL is not installed. At least I don't find it in the Release Notes.
    After installing it, cpan -D SDL reports "up to date".

    Update: The problem seems to be cpan reporting "up to date" for any not installed module:
    cpan> r Nonexisting::Module All modules are up to date for Nonexisting::Module
    This is not restricted to Strawberry, just confirmed it on my hoster's Linux (System Perl, 5.20.something)

    Update 2: What you want is probably cpan's i or m command:

    cpan> m SDL Module id = SDL CPAN_USERID FROGGS (Tobias Leich <froggs@cpan.org>) CPAN_VERSION 2.546 CPAN_FILE F/FR/FROGGS/SDL-2.546.tar.gz UPLOAD_DATE 2015-04-27 INST_FILE (not installed)
    (before installing it) versus (afterwards)
    Module id = SDL CPAN_USERID FROGGS (Tobias Leich <froggs@cpan.org>) CPAN_VERSION 2.546 CPAN_FILE F/FR/FROGGS/SDL-2.546.tar.gz UPLOAD_DATE 2015-04-27 INST_FILE C:\Install\perl-5.24.0.1\perl\site\lib\SDL.pm INST_VERSION 2.546
      Thanks soonix,

      I confirm that >cpan m SDL and the corrispective  CPAN::Shell->m('SDL') and also i works as expected.

      So the bug, if there is one as seems, is in the r command of cpan client and not a strawberry only issue.

      L*

      PS bug report filled

      PS 27 Dec 2018 bug fixed in 2.22 urrah!

      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
        Must be useful feature if the bug is 20yo, hahahhaha