|
Prev: FAQ 1.5 What was Ponie?
Next: How to record .asx files
From: Gunnar Hjalmarsson on 19 Apr 2008 15:11 I have installed Perl 5.10.0 on my Linux box to be available together with the vendor supplied Perl 5.8.1. When running programs under mod_perl, the old Perl version is utilized. How can I make mod_perl use Perl 5.10.0? Can mod_perl be configured so I can select Perl version on-the-fly? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
From: Ben Morrow on 19 Apr 2008 17:43 Quoth Gunnar Hjalmarsson <noreply(a)gunnar.cc>: > I have installed Perl 5.10.0 on my Linux box to be available together > with the vendor supplied Perl 5.8.1. When running programs under > mod_perl, the old Perl version is utilized. > > How can I make mod_perl use Perl 5.10.0? Can mod_perl be configured so I > can select Perl version on-the-fly? 5.10 is not binary-compatible with 5.8, so you will need to rebuild mod_perl against 5.10. AIUI, mod_perl needs to be rebuilt against a new version of perl anyway, as it does a lot of poking around in undocumented parts of perls guts. Ben
From: Sherman Pendley on 19 Apr 2008 18:21 Gunnar Hjalmarsson <noreply(a)gunnar.cc> writes: > I have installed Perl 5.10.0 on my Linux box to be available together > with the vendor supplied Perl 5.8.1. When running programs under > mod_perl, the old Perl version is utilized. > > How can I make mod_perl use Perl 5.10.0? Recompile & reinstall mod_perl. > Can mod_perl be configured so > I can select Perl version on-the-fly? No, the Apache module is linked to libperl, so it's specific to that Perl for the reason that an XS module is - libperl exports a different set of public symbols from one version to the next, and hides the differences behind an API that's almost entirely cpp macros. If you're looking for a more performant CGI replacement, you might look at FastCGI instead. The cost in terms of IPC between Apache and the app server are minimal, and like mod_perl it's a persistent environment, but like CGI, you simply use the #! line to choose a language interpreter. sherm- -- My blog: http://shermspace.blogspot.com Cocoa programming in Perl: http://camelbones.sourceforge.net
From: Sherman Pendley on 19 Apr 2008 20:20 Ben Morrow <ben(a)morrow.me.uk> writes: > Quoth Gunnar Hjalmarsson <noreply(a)gunnar.cc>: >> I have installed Perl 5.10.0 on my Linux box to be available together >> with the vendor supplied Perl 5.8.1. When running programs under >> mod_perl, the old Perl version is utilized. >> >> How can I make mod_perl use Perl 5.10.0? Can mod_perl be configured so I >> can select Perl version on-the-fly? > > 5.10 is not binary-compatible with 5.8, so you will need to rebuild > mod_perl against 5.10. AIUI, mod_perl needs to be rebuilt against a new > version of perl anyway, as it does a lot of poking around in > undocumented parts of perls guts. That appears to no longer be the case - mod_perl 2.0.4 was released just a couple days ago, and one of the listed changes is that "it works with 5.10." <http://mail-archives.apache.org/mod_mbox/perl-modperl/200804.mbox/browser> sherm-- -- My blog: http://shermspace.blogspot.com Cocoa programming in Perl: http://camelbones.sourceforge.net
From: Gunnar Hjalmarsson on 19 Apr 2008 20:42
Sherman Pendley wrote: > Gunnar Hjalmarsson <noreply(a)gunnar.cc> writes: >> I have installed Perl 5.10.0 on my Linux box to be available together >> with the vendor supplied Perl 5.8.1. When running programs under >> mod_perl, the old Perl version is utilized. >> >> How can I make mod_perl use Perl 5.10.0? > > Recompile & reinstall mod_perl. Yep, it proved to be that simple. >> Can mod_perl be configured so I can select Perl version on-the-fly? > > No, the Apache module is linked to libperl, so it's specific to that Perl > for the reason that an XS module is - libperl exports a different set of > public symbols from one version to the next, and hides the differences > behind an API that's almost entirely cpp macros. I noticed that /usr/lib/httpd/modules/mod_perl.so was overwritten during the installation; guess that's part of it... > If you're looking for a more performant CGI replacement, you might look > at FastCGI instead. The cost in terms of IPC between Apache and the app > server are minimal, and like mod_perl it's a persistent environment, but > like CGI, you simply use the #! line to choose a language interpreter. Maybe I should have a look at FastCGI. Thanks for the tip! And thanks both Ben and Sherman for your help. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl |