[Chicago-talk] Getting compile options from old perl install & other admin questions

Steven Lembark lembark at wrkhors.com
Sat Oct 16 23:14:41 CDT 2004



-- "Scott T. Hildreth" <shild at sbcglobal.net>

> The auto-config is pretty good now.  I like to put a new version
> of Perl in a dir, '/usr/local/perl-5.8.5', then I have a script
> which configs CPAN and installs all the modules that I need/want.
> I run some tests, if the new Perl install is working okay, I have
> a symlink /usr/local/perl which points to the version I want to use.
> If something is wrong I can always point /usr/local/perl back to the
> older install.  This works really well, for me at least, at work.  I
> can have the other developers test production code in without affecting
> production.  As far as compiling, I let Perl config,
>
> sh Configure -de -Dprefix=/usr/local/perl-5.8.x
>
> ..not that you care how I install Perl, just thought I would share. :-)

The autoinstall does a really nice job of getting a
working perl for your system. One trick that might
make it easier to upgrade is using subdirectories
for the perl versions:

	./Configure -cd -Dprefix=/opt/perl/5.8.X

With two symlinks this makes it easier to try out
new versions without overwriting older ones:

	cd /opt/perl;
	ln -fs 5.8.X/* .;

and

	cd /opt;
	mkdir bin;
	cd bin;
	ln -fs ../perl/bin/* .;

You can do the same for any other package (my /opt/bin
has 15+ packages from gcc through perl to gaim symlinked
into it). Nice thing about this is that you don't have
to modify your path to upgrade perl: just install the
new version in, say, 5.8.Y, test it, and when it seems
friendly you can:

	cd /opt/perl;
	rm *;
	ln -fs 5.8.Y/* .;

and you'll be off to the races.

If you consistently use:

	#!/opt/bin/perl

for your executables then you can upgrade perl versions
without having to modify any of your #! code on the system.
You can also find out that the currenet version has a bug
and downgrade the release with a single symlink.

There are two ways to handle /opt/perl/blah/lib in this case:

	1. Duplicate the applied modules via autobundle.
	2. Symlink the perl lib directory from 5.8.X to 5.8.Y
	   on the way in.

I normally use #1 since it makes downgrading -- or keeping
threading vs. optmized vs. statically-linked versions
simpler.

enjoi

-- 
Steven Lembark                                       85-09 90th Street
Workhorse Computing                                Woodhaven, NY 11421
lembark at wrkhors.com                                     1 888 359 3508


More information about the Chicago-talk mailing list