Hi Monks,
I'm not very fluent in English, but I ran into a problem that I couldn't solve on the Japanese question forum, so I decided to ask here.

Assumptions:

I have a contract with one of the major rental servers in Japan and run Perl CGI scripts on that server.
Unfortunately, in my contract, I don't have write permission for the Perl installation directory on that server, and can't connect SSH so I can't upgrade the module version.

Details of the problem:

Here is the problem I encountered this time.
I wrote ' use Encode; use Net::IMAP::Client; (or use Mail::IMAPClient;) ' because I wanted to use these two or three modules on the same script.
But the server returns the error below.

----------------------------------------- Encode version 2.87 required--this is only version 2.68 at ../lib_ext/ +Email/MIME/ContentType.pm line 7. BEGIN failed--compilation aborted at ../lib_ext/Email/MIME/ContentType +.pm line 7. -----------------------------------------

It says the ContentType.pm line 7 in Net::IMAP::Client requires the Encode version 2.87, even though the server has Encode version 2.68 module.
Unfortunately, I don't have permission to write to the Perl installation directory as already mentioned above.
So I installed the Encode-2.87.tar.gz downloaded from his CPAN in the user directory (../lib_ext) instead of XAMPP/Perl's standard lib directory on my Windows machine.
And I copied following generated files and folders to the server's user directory (../lib_ext).
File: Encode.pm/Encoding.pm/perllocal.pod
Directory: auto/encode
And when I added 'BEGIN { unshift(@INC, "../lib_ext") };' to the top of my script and ran it, the server returned the following error.

----------------------------------------- Encode object version 2.68 does not match bootstrap parameter 2.87 at +/usr/local/perl/5.10/lib/5.10.1/x86_64-linux-thread-multi/DynaLoader. +pm line 223. Compilation failed in require at my_script.pl line 8. BEGIN failed--compilation aborted at my_script.pl line 8. -----------------------------------------

My question:

Can someone please tell me how to use a module with a different version than the server's standard module?
Thank you for your patience in reading to the end.


In reply to Using a different module version than the one installed by soso_ynak

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.