I have a script that builds a perl and then uses CPANPLUS to install 200-odd CPAN tarballs. Previously I had all that install into a directory under /opt/perl which is where it would finally be installed.

I decided to change and do the installation somewhere else, but soon found @INC wasn't what I needed after moving under /opt/perl. I tried

-Duserelocatableinc

which is supposed incomptible with useshrplib (no longer needed with Darwin for acceptable performance).

@INC then changes as the path to perl does.

However one module, PDF-Report-1.33.tar.gz, now failed "make test" and therefore wasn't installed.

# Failed test 'use PDF::Report;' # at t/00-load.t line 6. # Tried to use 'PDF::Report'. # Error: Insecure dependency in eval while running with -T switch at .../lib/5.10.1/Math/Complex.pm line 36.

as that test runs under -T from Math::Complex

my $nvsize = $Config{nvsize} || ($Config{uselongdouble} && $Config{longdblsize}) || $Config{doublesize}; die "Math::Complex: Could not figure out nvsize\n" unless defined $nvsize; die "Math::Complex: Cannot not figure out max nv (nvsize = $nvsize +)\n" unless defined $DBL_MAX{$nvsize}; my $DBL_MAX = eval $DBL_MAX{$nvsize};

The final part of my perl build script checks modules by trying a one line script "use $mname" for each module listed in 02packages.details.txt against each tarball installed. Changing that to run under '-T' didn't result in any other module having a problem. That's slightly different than building and testing all modules under '-T'.

There's still a reasonable chance I'm doing something wrong, but is this sort of problem expected from 'relocatableinc' ?

Fortunately (?) very little of our code uses taint-mode so I could just remove the '-T' in that test or do the installation manually, or maybe create a symlink under /opt/perl.

I'm really some wisdom on the best approach I should use rather than just whether @INC is tainted.

Danny Thomas

This 5.10.1 was under RHEL5, but don't expect different results under FreeBSD and Darwin.


In reply to @INC tainted by -Duserelocatableinc ? by dthomas

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.