in reply to 2 perl distributions on Windows 7

You can't mix binary perl modules between major versions of Perl (or between processor architectures) To get XML::XPath working in your perl 5.12.x install you will need to separately install the same module there.

To keep the two perl installs separate, I suggest you create some batch files (named perl_58.bat and perl_512.bat) that setup the environment for each perl. You should not need to explicitly set PERL5LIB for correctly installed CPAN modules.

If it sounds like to much work to maintain two separate perl installs, then an alternative would be to configure git to use your perl 5.12 install.

Replies are listed 'Best First'.
Re^2: 2 perl distributions on Windows 7
by Anonymous Monk on Aug 18, 2011 at 18:53 UTC

    Thank you for responding. I think maintaining two environments would be fine, your idea of separate batch files is spot-on.... but any ideas how to force the 5.12 ppm to not know that 5.8 is around? I was horrified to see how (5.12) ppm somehow could tell that 5.8 existed. (And I can't tell if it matters that I'm working from a GitBash window, the reason for 5.8 to be around in the first place.)

      but any ideas how to force the 5.12 ppm to not know that 5.8 is around?

      Clearing the PERL5LIB environment variable should take care of that.
      As it stands, I think your 'ppm' is loading perl-5.12.4 - and perl-5.12.4 is finding the 5.8.8 Config.pm (because of the PERL5LIB setting).
      That 5.8.8 Config.pm correctly reports that the perl executable is version 5.8.8 ... and you get that mismatch error that you reported.
      Remove that PERL5LIB setting and all should be fine.

      Cheers,
      Rob
        Sorry, I skipped this step in my original post. If I open a new mingw32 GitBash window, carefully pre-pend PATH to include the two perl64 locations and not set PERL5LIB, my results are:
        $ ppm Can't locate ActivePerl/PPM/limited_inc.pm in @INC (@INC contains: /us +r/lib/perl5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/ +5.8.8/msys /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) + at /c/prog/Perl6/bin/ppm line 4. BEGIN failed--compilation aborted at /c/prog/Perl64/bin/ppm line 4.

        This is when I started feeling horrified that ppm, installed with 5.12 dist, somehow finding 5.8 libraries that I personally didn't directly install, in useful directories (/usr/lib/). I can't seem to find the rules for how @INC hardcodes(?) library paths?

        Thanks for your time. I really appreciate it.
        -pamela