Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Puzzled by ppm

by wrog (Friar)
on Feb 27, 2012 at 00:30 UTC ( [id://956350]=note: print w/replies, xml ) Need Help??


in reply to Puzzled by ppm

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...

Replies are listed 'Best First'.
Re^2: Puzzled by ppm
by roho (Bishop) on Feb 27, 2012 at 01:24 UTC
    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."

Re^2: Puzzled by ppm
by wrog (Friar) on Feb 28, 2012 at 00:06 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://956350]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found