Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I am working on getting a local installation of CPAN working, and in most cases following the instructions here have worked perfectly.

However, some module installations have tests with the -T flag. Test::Pod is an example. Even though my local installation paths are set in the $PERL5LIB environment variable, I am getting failures on the tests due to "module not found in @INC" and the displayed @INC does not contain the paths specified in $PERL5LIB. Normal taint behavior (according to perlsec) ignores this env var, but documentation for test_harness says it will load them into @INC for those in my scenario. I also tried adding -I and -Mlib= arguments to the FULLPERL definition in the makepl_arg argument in the ~/.cpan/CPAN/MyConfig.pm to no avail, regardless of the quoting methods I used. Only if I typo the path to not be those in $PERL5LIB will they show up in the @INC error message on the test failure.

How should one work around tests with the taint flag with local installations via CPAN? Modifying the test files themselves to remove the -T argument, or to add in 'use lib ="~/lib/perl5";' seems to be a very inelegant solution.

Example Info

From "perl -V":

%ENV: PERL5LIB="/home/dirvine/lib/perl5:/home/dirvine/lib/site_perl" @INC: /home/dirvine/lib/perl5/aix-thread-multi /home/dirvine/lib/perl5 /home/dirvine/lib/site_perl/5.8.2/aix-thread-multi /home/dirvine/lib/site_perl/5.8.2 /home/dirvine/lib/site_perl /usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2 /usr/opt/perl5/lib/site_perl
From "perl -MCPAN -e shell":

ibm02:/home/dirvine/.cpan/CPAN> perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.9304) ReadLine support enabled cpan[1]> test Test::Pod
skip
Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" + "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load.t ............ 1/1 # Failed test (t/00-load.t at line 8) # Tried to use 'Test::Pod'. # Error: Can't locate Pod/Simple.pm in @INC (@INC contains: /home +/dirvine/.cpan/build/Test-Pod-1.26-CUlfA6/blib/lib /home/dirvine/.cpa +n/build/Test-Pod-1.26-CUlfA6/blib/arch /usr/opt/perl5/lib/5.8.2/aix-t +hread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8 +.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2 /usr/opt/perl5 +/lib/site_perl) at /home/dirvine/.cpan/build/Test-Pod-1.26-CUlfA6/bli +b/lib/Test/Pod.pm line 67.

In reply to Local CPAN instalation and test's with taint flags by Anonymous Monk

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others admiring the Monastery: (3)
    As of 2024-07-25 04:04 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?
      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.