in reply to Re: use 5.005 with perl v5.16.3
in thread use 5.005 with perl v5.16.3

Okay I found when it happens" In /siji_general.pm this give the compilation error above:

use lib "//perl/perl_for_siji"; use JSON;

But this does not:

use JSON; use lib "//perl/perl_for_siji";

What might be the issue and how can I solve it without changing the code at all. Thanks

Replies are listed 'Best First'.
Re^3: use 5.005 with perl v5.16.3
by haukex (Archbishop) on Aug 08, 2021 at 08:49 UTC

    That means you've got two (probably different) versions of JSON in /perl/perl_for_siji and in the standard library locations (@INC), and the one in /perl/perl_for_siji appears to be broken somehow. There are different ways to try and debug and fix this, however, it's unclear to me why you even need libraries from /perl/perl_for_siji, so you'd need to explain your installation more for us to be able to give good advice.

      The script is a big script which wasnt written all by me. So I dont know for which purpose they need libraries from  /perl/perl_for_siji/, but they do. This issue doesnt appear in a different server which has a differernt perl and maybe a different @INC? How can I debug this? Is there a way to see what is in the @INC list?

        Is there a way to see what is in the @INC list?

        Of course:

        perl -E 'say qq/@INC/'

        🦛