Hello,

I am currently running Perl on 11 different platforms. I need help determining the best practice for dynamically switching libraries when one runs a different version of Perl on different platforms.

My requirements are:


When I moved the code to aix, I sorted out a few library issues and went back to check my changes on solaris. Solaris blew up and stated:
perl $FOO/foo.pl -bla bla bla IO object version 1.20 does not match bootstrap parameter 1.15 at /usr +/local/lib /perl5/5.6.1//sun4-solaris/DynaLoader.pm line 225. Compilation failed in require at /.../perl/lib/Custom_mods/logfile. pm line 49. BEGIN failed--compilation aborted at /.../perl/lib/Custom_mods/logf ile.pm line 49. Compilation failed in require at /abc/123/foo.pl line 9 3. BEGIN failed--compilation aborted at /abc/123/foo.pl li ne 93.

I think the problem here is that logfile.pm is looking for the Perl 5.6.1 version of Handle.pm, which is 1.21. The aix system is running Perl 5.005_03 and I am pointing to the accompanying version of handle.pm that is 1.1505. Because of the dependencies the Perl 5.005_03 flavored system is barfing now that I am trying to run it in the 5.6.1 environment.
Here are the versions of the IO modules that I am running:
Here are the Perl 5.005_03 versions of the IO modules that I am running:
Module		Version
File.pm		1.06021
Handle.pm	1.1505
Pipe		1.0902
Seekable	1.06
Select		1.10
Socket		1.1603

I have both flavors of the IO modules. The question is, how do I dynamically switch between them? I need to get everything running under 5.005_03, but if I can just switch it for solaris and windows I am golden (at least for the short term). What is the best practice to do this w/ or w/o the use of a BEGIN statement?
My Perl env on solaris is as follows:
PERL_HOME=/usr/local/bin
PERL=/usr/local/bin/perl
PERL5LIB=/usr/local/lib/perl5/5.6.1/:/foo/custom/perl/lib
and on aix:
PERL=/bin/perl
PERL5LIB=/usr/opt/perl5/lib/5.00503:/foo/custom/perl/lib
PERL_HOME=/bin

Thanks in advance for your help :)

-P0w3rK!d

P.S. I have no idea why I am seeing this:

/usr/local/lib/perl5/5.6.1//sun4-solaris/DynaLoader.pm

There appear to be no libraries on the solaris box I am using other than for Perl 5.6.1. There is a Perl executable of version 5.00404. This probably is not related, but I want to make sure.

Edit re IO mod's at author's req. - dvergin 2003-04-15


In reply to How to handle Cross-platform Perl, modules, and versioning by P0w3rK!d

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.