Greetings to the wise. I have a script that needs to transfer data from CSB files to MySQL. The environment is CentOS 6.4 (64-bit) with Perl 5.18.1. I am using and have installed Text::CSV::Auto::ExportTo::MySQL from CPAN:
[root@uncle /]# find /usr/local/lib/perl5 -name "MySQL.pm" -ls 2102089 8 -r--r--r-- 1 root root 5036 Mar 8 2011 /u +sr/local/lib/perl5/site_perl/5.18.1/Text/CSV/Auto/ExportTo/MySQL.pm
When I use this module in my code, I get the error:
Can't locate Moose.pm in @INC (@INC contains: /usr/local/lib/perl5/sit +e_perl/5.18.1 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib6 +4/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /us +r/share/perl5 .) at /usr/local/lib/perl5/site_perl/5.18.1/Text/CSV/Au +to/ExportTo/MySQL.pm line 5. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +18.1/Text/CSV/Auto/ExportTo/MySQL.pm line 5. Compilation failed in require at ./uscb.pl line 13. BEGIN failed--compilation aborted at ./uscb.pl line 13.

Clearly the module is there at /usr/local/lib/perl5/site_perl/5.18.1/Text/CSV/Auto/ExportTo/MySQL.pm, but yet Perl can't find it.

When I add use lib "/usr/local/lib/perl5/site_perl/5.18.1/x86_64-linux" to my code, it still can't find.

I have now copied modules all over the place, reinstalled perl & CPAN and done other desperate things which have left my system in a mess. Is there a way to re-install Perl on CentOS6.4 to get a clean Perl environment?

Thank you kindly, Hamid.


In reply to MySQL.pm and PERL5LIB by Hammer2001

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.