Hi,

I have a question pertaining to mod_perl 2.0.4 and Perl 5.10.0 on Linux:

In our project we have complied Perl with relocatable INC so that we can deploy it everywhere we want.

I have used that Perl to build mod_perl and now when I try to load a startup-script I get an error "Can't locate strict.pm in @INC".

This I assume is due to the fact that with relocatable INC Perl looks for standard modules relative to the location of the executable which in the case of mod_perl probably is the location httpd-executable, so of course it cannot find anything.

My workaround at the moment is to add a

PerlSwitches -I/sandbox/trunk/perl/lib/5.10.0
directive to the httpd.conf, but I wonder if there is a better way to do this...

So my questions are:

Am I right in assuming that this behaviour of mod_perl is due to the relocatable INC and what is the best way to ensure that mod_perl can then find the standard modules?

Many thanks!


In reply to mod_perl and relocatable INC by morgon

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.