0

this question is a follow up to: What's the search order in perl's include path when a module is loaded posted a while back but that remained unanswered.

I have 2 versions (1.22 and 1.25) of the module IO installed in two separate folders:

/some_path/lib/perl5/x86_64-linux-thread-multi/ (for IO.pm version 1.25) and /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/ (for IO.pm version 1.22)

The @INC list looks like:

/some_path/lib/perl5/x86_64-linux-thread-multi/
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/  
/usr/lib/perl5/site_perl/5.8.8/  
/usr/lib/perl5/site_perl/  
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/  
/usr/lib/perl5/vendor_perl/5.8.8/  
/usr/lib/perl5/vendor_perl/  
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/  
/usr/lib/perl5/5.8.8/  
.  

When i try perl -e 'use IO', perl returns the following error message:
IO object version 1.22 does not match bootstrap parameter 1.25 at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 253. which suggests that the IO module version 1.22 is used instead of IO version 1.25 even though the IO version 1.25 should be located first.

Any idea why that is?

Community
  • 1
  • 1
mhursin
  • 1
  • 1
  • Remained unanswered?! The linked question has two perfectly fine answers: Perl searches from the lowest index of @INC to the highest until the desired file is found. – ikegami Mar 05 '13 at 19:18
  • sorry, what I meant is that the answers provided to the questions didn't solve my particular problem. – mhursin Mar 06 '13 at 08:06

1 Answers1

2

You have a bad install of IO.

perl is finding 1.25's IO.pm in /some_path/lib/perl5/x86_64-linux-thread-multi/ as intended, but the first auto/IO/IO.so it finds is 1.22's (in /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/?)

ikegami
  • 367,544
  • 15
  • 269
  • 518