<p>I want to use Apple's or RedHat's built-in Apache but I want to use Perl 5.10 and mod_perl.  What's the least intrusive way to accomplish this?  I want the advantage of free security patching for the vendor's Apache, dav, php, etc., but I care a lot about which version of Perl I use and what's in my @INC path.  I don't mind compiling my own mod_perl.</p>

[{'answer_id': 79696, 'author': 'Ian', 'author_id': 2311, 'author_profile': 'https://Stackoverflow.com/users/2311', 'pm_score': 1, 'selected': False, 'text': '<p>You\'ll want to look into <a href="http://httpd.apache.org/docs/2.2/mod/mod_so.html" rel="nofollow noreferrer">mod_so</a></p>\n'}, {'answer_id': 80032, 'author': 'Gary Richardson', 'author_id': 2506, 'author_profile': 'https://Stackoverflow.com/users/2506', 'pm_score': 1, 'selected': False, 'text': '<p>I\'ve done this before. It wasn\'t pretty, but it worked, especially since vendor perl\'s are usually 2-3 years old.</p>\n\n<p>I started with making my own perl RPM that installed perl into a different location, like <code>/opt/</code>. This was pretty straight forward. I mostly started with this because I didn\'t want the system utilities that used perl to break when I upgraded/installed new modules. I had to modify all my scripts to specify <code>#!/opt/bin/perl</code> at the top and sometimes I even played with the path to make sure my perl came first.</p>\n\n<p>Next, I grabbed a mod_perl source RPM and modified it to use my <code>/opt/bin/perl</code> instead of <code>/usr/bin/perl</code>. I don\'t have access to the changes I made, since it was at a different gig. It took me a bit of playing around to get it. </p>\n\n<p>It did work, but I\'m not an RPM wizard, so dependency checking didn\'t work out so well. For example, I could uninstall my custom RPM and break everything. It wasn\'t a big deal for me, so I moved on.</p>\n\n<p>I was also mixing RPM\'s with CPAN installs of modules (did I mention we built our own custom CPAN mirror with our own code?). This was a bit fragile too. Again, I didn\'t have the resources (ie, time) to figure out how to bend <a href="http://sourceforge.net/projects/cpan2rpm/" rel="nofollow noreferrer">cpan2rpm</a> to use my perl and not cause RPM conflicts.</p>\n\n<p>If I had it all to do again, I would make a custom 5.10 perl RPM and just replace the system perl. Then I would use <code>cpan2rpm</code> to create the RPM packages I needed for my software and compile my own mod_perl RPM.</p>\n'}, {'answer_id': 83080, 'author': 'Michael Cramer', 'author_id': 1496728, 'author_profile': 'https://Stackoverflow.com/users/1496728', 'pm_score': 4, 'selected': True, 'text': "<ol>\n<li><p>Build your version of Perl 5.10 following any special instructions from the mod_perl documentation. Tell Perl configurator to install in some non-standard place, like /usr/local/perl/5.10.0</p></li>\n<li><p>Use the instructions to build a shared library (or dynamic, or .so) mod_perl against your distribution's Apache, but make sure you run the Makefile.PL using <em>your</em> version of perl:</p>\n\n<p>/usr/local/perl/5.10.0/bin/perl Makefile.PL APXS=/usr/bin/apxs</p></li>\n<li><p>Install and configure mod_perl like normal.</p></li>\n</ol>\n\n<p>It may be helpful, after step one, to change your path so you don't accidentially get confused about which version of Perl you're using:</p>\n\n<pre><code>export PATH=/usr/local/perl/5.10.0/bin:$PATH\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/79493', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/14783/']