Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
PerlMonks and PERL5LIB

by Hammer2001 (Novice)
on Jan 16, 2014 at 20:57 UTC ( #1070852=perlquestion: print w/ replies, xml ) Need Help??
Hammer2001 has asked for the wisdom of the Perl Monks concerning the following question:

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 "" -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/
When I use this module in my code, I get the error:
Can't locate 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/ line 5. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +18.1/Text/CSV/Auto/ExportTo/ line 5. Compilation failed in require at ./ line 13. BEGIN failed--compilation aborted at ./ line 13.

Clearly the module is there at /usr/local/lib/perl5/site_perl/5.18.1/Text/CSV/Auto/ExportTo/, 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.

Comment on and PERL5LIB
Select or Download Code
Re: and PERL5LIB
by atcroft (Monsignor) on Jan 16, 2014 at 21:58 UTC

    (Hint: <code></code> tags will help with post readability when posting code or error messages.)

    It looks like you do not have Moose installed. Either look for a .rpm package (using yum search Moose or your favorite package manager), or look at installing via CPAN (perl -MCPAN -e 'install Moose'). Being a CentOS (RedHat-derivative), I would suggest looking for an RPM package first.

    If you want a "clean" perl environment, you can look at installing perlbrew.

    Hope that helps.

      Thank you, atcroft for the guidance. Moose is not available as a yum package or an RPM. I have done install and force install of Moose multiple times. The errors alternate between and Will look into perlbrew and let you know if it gets me out of the Perlhole I am in. Thanks, Hamid.

        The errors alternate between and

        You might be overwriting PERL5LIB when you should be adding to it? What's the full path to

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1070852]
Approved by Old_Gray_Bear
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-09-20 18:05 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (160 votes), past polls