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


in reply to Architecture-specific module conflicts under perlbrew

I tried to reproduce this under Mac OS X Mountain Lion with 5.16.2 as well as with 5.16.3.

I couldn't, everything looks good and works. I skip the details, please believe me for now ;-)

Nice for me but that doesn't help, OK.

On the other hand, as far as i understood your XS.pm is in your @INC.

IMHO it can be everywhere, even in /nose/cuke as long as you declare this.

At my system(s), it is in a site_perl directory, where it belongs.

Just now i tried it under Mac OS X Lion:

./perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.2/darwin-2level/ +JSON/XS.pm

And it works too.

So why not opening an issue at github and ask for help?

Update:

I'm very interested in learning about this because i just started using perlbrew. I have it on two Macs for devel and on one SLES11 Debian box for testing my new Icinga/Nagios...

I hope, that i didn't miss something and best regards, Karl

P.S.: I assume, you did the setup as described in the sources you mentioned - and you use cpanm...

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^2: Architecture-specific module conflicts under perlbrew
by gnosti (Chaplain) on May 16, 2013 at 19:14 UTC
    Yes, XS.pm got installed to the wrong directory in my @INC, an arch-specific but perl version-agnostic directory that should not even exist!

    You're right about opening an issue, although the previous reply suggests I might be able to get the correct behavior by setting the appropriate environment variables.

    Usually I come to PM first with my problems because they are more often due to my own ignorance than to a bug.

    Thanks and good luck with your various boxen.

      «Yes, XS.pm got installed to the wrong directory in my @INC...»

      But you don't get this well known message:

      Karls-Mac-mini:~ karl $ perl -MFOO Can't locate FOO.pm in @INC (@INC contains: #...bla, bla

      You get Perl API version v5.14.0...Compilation failed in require.

      That damned thing seems to be available - perhaps a bad place, but it is in your @INC, isn't it?

      Totally stupid "brute force" approach: Copy that thing to a place where you think it belongs (in @INC).

      Do you still get this compile time error? Or do i still miss something?

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

        I believe that JSON::XS was installed under perl 5.14, and found (and choked on) by a separate perl 5.16. If I install with cpanm -f I can clobber one version with another, but that sort of defeats the purpose of perlbrew, which is separate, functioning alternative perl versions with their respective modules.

        I posted that as an example of things generally going wrong, rather than as a specific glitch to overcome.

        regards,

        Joel