Date: 12 Mar 2001 21:33:25 -0600 From: Tim Ayers <tayers@bridge.com> To: freebsd-questions@FreeBSD.ORG Subject: Re: upgrading to perl 5.6 Message-ID: <uhf0y4a2i.fsf@tim.bridge.com> In-Reply-To: Brennan Stehling's message of "Mon, 12 Mar 2001 19:57:31 -0600 (CST)" References: <Pine.BSF.4.21.0103121939490.24791-100000@home.offwhite.net>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "B" == Brennan Stehling <brennan@offwhite.net> writes: B> I would like to use the IO::Socket module but it requires perl 5.6. I B> realize that perl is integrated rather closely with FreeBSD and various B> system tools so I am unsure how a perl upgrade would affect the system. B> Has anyone upgraded perl to 5.6? Has it affected cgi scripts badly or any B> of the system utilities? I have upgraded several different servers to Perl 5.6. I have no problems at all. B> Also, is there a way to install it safely to another location? That's easy. When you run the Configure script before building Perl it will ask where you want the binaries, scripts, libs and man pages installed. Give whatever values you want. You need to be careful about your search paths, tho, since you will have Perl 5.5 in /usr/bin and Perl 5.6.0 where ever you put it. B> I am running 2 FreeBSD 4.2 systems which were both built in the last 3 B> months. B> Any tips would be appreciated. The tips come in handy when you want to replace the existing Perl, which is what I do. By default (and convention ?) the various pieces of Perl are installed in /usr/local/bin, /usr/local/man, and /usr/local/lib. But FreeBSD scatters Perl all over the place: binaries and scripts are in /usr/bin man pages are in /usr/share/man modules are in /usr/local/lib ( Was the original Perl installer a schizophrenic? Pick a f*cking branch and stick to it! ;-) So to replace the existing Perl you need to give these directories when asked by the Configure script. Everything else can just be defaulted. Or just use $ sh Configure -sde \ -A define:bin=/usr/bin \ -A define:sitebin=/usr/bin \ -A define:man1dir=/usr/share/man/man1 \ -A define:man3dir=/usr/share/man/man3 This will create the configuration without prompting. Then after you have run "make && make test && make install" you still have a /usr/bin/perl5.00503 and a /usr/bin/perl5 that is hard linked to it. So I do $ rm /usr/bin/perl5; ln /usr/bin/perl5.6.0 /usr/bin/perl5 to make /usr/bin/perl5 point at the new Perl. I leave the old Perl lying around in case something is hard-coded to use it. The final adjustment is to tell the ports system to use the new Perl. Edit /usr/ports/Mk/bsd.port.mk by changing all instances of 5.00503 to 5.6.0. This way when you build any ports, like mod_perl, it will use the new Perl. And of course I use the CPAN module (perldoc CPAN) to install any new modules. I can't say if you can install modules from the ports tree after this upgrade, but I haven't found the need. HTH and good luck. Hope you have a very nice day, :-) Tim Ayers (tayers@bridge.com) P.S. These steps have been honed by trial and error so they are far from official or definitive. But I haven't had any problems with this set up for several months on a few different servers so I think they are okay. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?uhf0y4a2i.fsf>