The instance of Perl you use to invoke the Makefile.PL (or other first-step Perl script) sets which instance of Perl the module will be built for. If you built it for the wrong version, then just rebuild it, this time using the proper instance of Perl to run the Makefile.PL.

make clean $path_to_version/perl Makefile.PL make ...

If you do not have a specific need for having two different versions of Perl installed, then it sounds like you would have a much easier time if you were to uninstall the version of Perl that you don't need.

If you do have a need for two versions of Perl (it is rather common to "leave the 'system' Perl alone" and to install your own version of Perl that you can customize for your needs), then I would next uninstall the version of Perl that you installed and then re-install it, this time making sure that your new version does not share any module directories with the other version of Perl.

Having two versions of Perl sharing a directory where modules are installed is usually not worth the resulting complexity.

If the only module directory being shared between the two versions of Perl is your user-specific directory, then we come back to "use the right version of Perl". Make an alias or change your $PATH or something so you stop jumping between Perl versions for different steps of what you are trying to do.

- tye        


In reply to Re^3: Can't load DBlib.so - sybperl 2.18 (2 perls) by tye
in thread Can't load DBlib.so - sybperl 2.18 by Bijal

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.