Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Just wanted to post this here because it took me some time to figure it out and couldn't find much about this elsewhere.

I had some problems trying to deploy a Catalyst app on a server where my CPAN (and my own modules) are installed in a local directory handled by local::lib.
I use Apache2 and the app runs as a cluster of FastCGI processes (static setup). Altough the user who runs Apache has the PERL5LIB properly set up in a login shell, somehow Apache didn't see this setting. Turns out that Apache deliberately ignores the PERL5LIB unless you explicitly tell it to use it with a PassEnv directive.
In addition, you also need to pass the PERL5LIB path through to the acutal FastCGI processes so that they are started up in the correct environment. You do that with the -initial-env option to the FastCgiServer directive.
All in all, you should have something like this in the config file for the site:

<VirtualHost *:*> [... YOUR USUAL CONFIG STUFF HERE ] # tell Apache to use the PERL5LIB PassEnv PERL5LIB # pass it on to the fastcgi processes that Apache will # start up for us (3 in this case) FastCgiServer /PATH/TO/ -processes 3 -initial-env P +ERL5LIB </VirtualHost>
The PERL5LIB is setup in the bash profile for the user who runs Apache in my case (using local::lib). You could also substitute PERL5LIB for an explicit path in the above code snippet.

In reply to Catlyst, Apache and local CPAN installations by tospo

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?

    What's my password?
    Create A New User
    [holli]: You see, I have a friend whose daughter has been damaged seriously because she wasn't vaccinated against measles. (Her mother being anti-vaxx).
    [LanX]: Contrary to Olivia newton John I don't like physical confrontations ...
    [LanX]: Oh, you spread measles in your saliva?
    [LanX]: ... and why did you bite hos daughter?
    [LanX]: *his
    [holli]: And this guy was also Anti-Vaxx and I just snapped. I shoed him all over the yard
    [james28909]: biting between the legs? now thats my kind of religion.
    [holli]: and back into the building, saw him later peeking out of the window looking scared. It was hilarious.
    [LanX]: Let's get physical...
    [james28909]: wish i could stay and chat. i have an unsuspecting client to give an estimate to. muhhahaha

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (10)
    As of 2017-12-13 18:07 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (373 votes). Check out past polls.