title: How can I install CPAN modules locally without root access (DynaLoader.pm line 229 error)?
body: <p>Doesn't work with other modules, but to give an example. I installed Text::CSV_XS with a CPAN setting:</p>
  
  <pre><code>'makepl_arg' =&gt; q[PREFIX=~/lib],
  </code></pre>
  
  <p>When I try running a test.pl script:</p>
  
  <blockquote>
    <p>$ perl test.pl</p>
  </blockquote>
  
  <pre><code>#!/usr/bin/perl
  
  use lib "/homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi";
  
  use Text::CSV_XS;
  
  print "test";
  </code></pre>
  
  <p>I get</p>
  
  <pre>
  Can't load '/homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so' for module Text::CSV_XS: /homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so: cannot open shared object file: No such file or directory at /www/common/perl/lib/5.8.2/i686-linux/DynaLoader.pm line 229.
  at test.pl line 6
  Compilation failed in require at test.pl line 6.
  BEGIN failed--compilation aborted at test.pl line 6.
  </pre>
  
  <p>I traced the error back to DynaLoader.pm it happens at this line:</p>
  
  <pre><code># Many dynamic extension loading problems will appear to come from
  # this section of code: XYZ failed at line 123 of DynaLoader.pm.
  # Often these errors are actually occurring in the initialisation
  # C code of the extension XS file. Perl reports the error as being
  # in this perl code simply because this was the last perl code
  # it executed.
  
  my $libref = dl_load_file($file, $module-&gt;dl_load_flags) or
      croak("Can't load '$file' for module $module: ".dl_error());
  </code></pre>
  
  <p><b>CSV_XS.so exists in the above directory</b></p>