http://www.perlmonks.org?node_id=956336

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

I have Activestate perl 5.8.9 (build 827) on Windows Vista. I recently noticed that every time I run ppm upgrade --install certain modules are processed every time with the same before and after version numbers. There are 84 modules that do this. I tried deleting C:\Perl\site\etc\ppm-site-area.db and letting ppm regenerate it, but the same thing still happens. I tried turning off all repos other than Activestate, but that did not help either. Turning the other repos back on regenerated their packing lists, but that also did not help. The most recent version of the modules exist in \Perl\site\lib, but the version ppm says I have is the version in \Perl\lib. Why does ppm look at \Perl\lib for the current version for only these 84 modules? I have run out of ideas to check, so I'm asking for the monastery's help in solving this perplexing riddle. Here is the list of modules affected, including the before and after version numbers reported by ppm. Thanks.

Update: I put the module list in readmore tags but they show up in the main display.

Update2: Just re-read "Markup in the Monastery". The readmore link only appears if the question is front-paged. My bad.

Archive-Extract 0.60 (have ) Archive-Tar 1.82 (have 1.48-r1) Archive-Zip 1.30 (have 1.26) B-Debug 1.17 (have 1.12) Bit-Vector 7.1 (have 6.4) Carp-Clan 6.04 (have 6.00) Class-Accessor 0.34 (have 0.33) Compress-Raw-Bzip2 2.049 (have 2.019) Compress-Raw-Zlib 2.051 (have 2.019) Crypt-SSLeay 0.58 (have 0.57) DBD-CSV 0.33 (have 0.22) DBD-ODBC 1.33 (have 1.16) DBD-SQLite 1.35 (have 1.25) DBI 1.616 (have 1.607) Data-Dump 1.21 (have 1.14) Date-Calc 6.3 (have 5.4) Digest-HMAC 1.03 (have 1.01) Digest-SHA 5.70 (have 5.47) Digest-SHA1 2.13 (have 2.11) ExtUtils-CBuilder 0.280205 (have 0.24) File-Fetch 0.32 (have ) File-HomeDir 0.99 (have 0.86) File-Next 1.06 (have 1.02) File-Which 1.09 (have 0.05) Filter 1.43 (have ) HTML-Parser 3.69 (have 3.60) HTML-Tree 4.2 (have 3.23) IO-Compress 2.049 (have 2.019) IO-Zlib 1.10 (have 1.09) IPC-Cmd 0.76 (have ) JSON 2.53 (have 2.14) JSON-XS 2.32 (have 2.232) Log-Message 0.04 (have ) Log-Message-Simple 0.08 (have ) Math-BigInt 1.997 (have 1.89) Math-BigInt-FastCalc 0.30 (have 0.19) Math-BigRat 0.2602 (have 0.22) Math-Complex 1.59 (have 1.56) Memoize 1.02 (have ) Module-Build 0.40 (have 0.33) Module-Load 0.22 (have ) Module-Load-Conditional 0.46 (have ) Module-Loaded 0.08 (have ) Object-Accessor 0.42 (have ) PPM-Repositories 0.19 (have 0.15) Params-Check 0.32 (have ) Params-Util 1.04 (have ) Pod-Simple 3.19 (have 3.07) SOAP-Lite 0.714 (have 0.55-r1) SQL-Statement 1.33 (have 1.15) Sub-Uplevel 0.24 (have 0.2002) Term-ReadLine-Perl 1.0303 (have 1.0302-r1) Term-UI 0.30 (have ) Test-Differences 0.61 (have 0.4801) Test-Exception 0.31 (have 0.27) Test-Harness 3.23 (have ) Test-Simple 0.98 (have ) Text-Autoformat 1.669002 (have 1.666.0) Text-CSV_XS 0.86 (have 0.64) Text-Diff 1.41 (have 0.35) Text-Glob 0.09 (have 0.08) Text-Reform 1.20 (have 1.11) Thread-Queue 2.12 (have 2.11) Thread-Semaphore 2.12 (have 2.09) Time-HiRes 1.9725 (have 1.9715) Time-Piece 1.20 (have 1.14) URI 1.59 (have 1.37) WWW-Mechanize 1.60 (have 1.54-r1) Win32 0.44 (have 0.39) Win32-API 0.64 (have 0.58) Win32-Clipboard 0.56 (have 0.55) Win32-IPC 1.09 (have 1.07) Win32-Job 0.04 (have 0.03) Win32-TieRegistry 0.26 (have 0.25) Win32API-Net 0.16 (have 0.12) Win32API-Registry 0.32 (have 0.30) YAML-LibYAML 0.38 (have 0.32) autodie 2.10 (have ) bignum 0.29 (have 0.23) common-sense 3.4 (have ) parent 0.225 (have ) threads 1.86 (have 1.72) threads-shared 1.40 (have 1.28) version 0.96 (have 0.76)

"Its not how hard you work, its how much you get done."

Replies are listed 'Best First'.
Re: Puzzled by ppm
by wrog (Friar) on Feb 27, 2012 at 00:30 UTC
    The most recent version of the modules exist in \Perl\site\lib, but the version ppm says I have is the version in \Perl\lib.
    What's the default setting for @INC (perl -V should tell you)?

    When looking for a module, the directories in @INC are searched in order. Once said module is found, the remaining directories are ignored. So if \Perl\lib is in front of \Perl\site\lib then whatever is in \Perl\lib takes precedence and the only way anything will change is if you install the upgraded version in \Perl\lib which you need to tell PPM to do explicitly (I believe upgrade --precious does this) and which, depending on what you're upgrading, may possibly break your perl installation, which is why the packager folks generally try to make this sort of thing hard to do by accident...

      Thanks for the suggestion, but perl -V shows:
      @INC: C:/Perl/site/lib/MSWin32-x86-multi-thread C:/Perl/site/lib C:/Perl/lib .

      Also, it's only the listed modules that are affected, not all of them.

      "Its not how hard you work, its how much you get done."

      some searching seems to indicate that PPM itself (or at least the older pre-version-4 PPM) sets aside certain modules and makes sure to only load a given set of versions that are known to work together — best guess here is that when PPM runs, it messes with @INC so that the lib directory is in front of the site/lib directory so that it's sure of getting the versions that are known to work. Apparently, using the --precious flag will indeed do an install into the lib directory so that PPM will see it, but that
      1. you don't actually have to do this since for all ordinary programs, site/lib will take precedence anyway, and
      2. if you install something stupid/b0rken into lib that causes PPM to break, this will be difficult to fix.

      Things to try

      • perl -mArchive::Tar -e "print $Archive::Tar::VERSION"
      • perl -IC:\Perl\lib -mArchive::Tar -e "print $Archive::Tar::VERSION"

      If the first gives you 1.82 and the second gives you 1.48-r1, then you'll know that you're indeed getting the later version for ordinary code, the only way the earlier version is even seen is if you mess with @INC, and PPM is evidently messing with @INC and so you don't actually have to do anything (i.e., if you can live with PPM itself seeing the wrong version...)

      Or, if you're feeling adventurous you could try upgrade --precious on Archive::Tar and see what happens.

Re: Puzzled by ppm
by Anonymous Monk on Feb 27, 2012 at 00:19 UTC

    I have Activestate perl 5.8.9 (build 827) ...

    That is an unsupported version of perl for any platform

    If you have a contract with Activestate , well, then you know who to contact for support, otherwise upgrade to 5.14.2

      Would love to upgrade, but must stay in sync with Perl version at work.

      "Its not how hard you work, its how much you get done."

Re: Puzzled by ppm
by syphilis (Archbishop) on Feb 28, 2012 at 06:33 UTC
    You might also try ppm area sync and see if that does anything useful.
    (I really don't know if it does :-)

    Cheers,
    Rob
      Thanks for the suggestion, but when I run ppm area sync i get the following error msg:

      ppm area failed: Uninitialized install area user

      "Its not how hard you work, its how much you get done."

        That's interesting. What does ppm area list report ?
        It so happens that I have build 827 (in a largely-unmeddled-with form) and for me it reports that I have 2 areas:

        site*:  C:/_32/ap827/site/lib
        and
        perl: C:/_32/ap827/lib

        I then get:
        C:\_32>ppm area sync Syncing site PPM database with .packlists...done Syncing perl PPM database with .packlists...done
        Do you have a 'user' area that hasn't been assigned a value ?

        Cheers,
        Rob

        You can always install the old PPM 2 series :D, though I recommend doing so in a PERLLIB

Re: Puzzled by ppm
by MidLifeXis (Monsignor) on Apr 05, 2013 at 17:26 UTC

    I also ran across this. The cause appears to be modules were installed into C:\Perl\installdir, and my path at the time of the install as c:\perl\installdir. I made the two (PATH and the actual directory name) the same, removed site, and reinstalled my packages, and voila, all is well with the world.

    Note that I did not start noticing this until _after_ I installed a module and reopened ppm-shell. Does not mean that it didn't have an issue, just that I did not notice it.

    --MidLifeXis