-   Slackware (
-   -   Updating Perl in Slackware (

Woodsman 10-12-2008 07:30 PM

Updating Perl in Slackware
This afternoon I experimented with updating to current on my testing partitions.

A while ago I installed some third-party perl modules to support some perl scripts I needed. The modules installed to /usr/lib/perl5/5.8.8. When I updated Slackware to current, those files remained as a remnant after perl 5.8.8 was replaced by 5.10.0.

I am clueless about perl and modules --- and CPAN. I can move those remnant files to 5.10.0. However, what is the best policy for installing third-party perl modules to encourage clean Slackware package updates? I want to automate the process as much as possible without losing the third-party modules.


McSlack 10-12-2008 08:47 PM

I recently tried upgrading a small machine that had perl-5.6.2 to 5.10.0 and ran out of disk space. Perl seems to double with each upgrade. I know you to be quite knowledgeable about all things linux so I'm a little afraid to give you the easy answer. Do you have the module sources or just the binaries? With most sources, after unpacking them I just type:


perl Makefile.PL
make test
make install

I guess with the binaries I would just make the directories in the new 5.10.0 tree and move them from the old 5.8.8 tree.

I know that's not the slack way, but it should work.

jong357 10-12-2008 10:03 PM

Sure that's the slack way. To my knowledge, using a new perl proper, you'll need to rebuild all your modules as well.

You could probably force the perl install to just dump to /usr/lib/perl and then coax the modules to do the same, if they didn't automatically. Then nothing would be out of place with an upgrade, but I'd want to rebuild all my modules anyway with a new perl version to insure compat....

Keep an eye on the changelog. If you see perl upgraded, you'll probably also see a whole bunch of packages follow suit. The modules may still be seen and used tho. Don't know. I don't use perl for alot of things.

Woodsman 10-12-2008 10:10 PM


I know you to be quite knowledgeable about all things linux
Yikes! You have me banging my head on the desk and the real gurus snickering... :D Well thanks for the compliment, but I'm a long way from being "quite knowledgeable about all things linux". I ask as many questions around here as I try to answer!

Anyway, the three modules I installed were date and time related. I installed them the same way you described. Possibly I could store the modules in my builds area, and then write a shell script to install them with each Slackware update. Not quite a traditional Slackware tgz package but close. Seems there has to be a way to automate this process with each Slackware release.

acummings 10-13-2008 12:40 AM


FWIW, I had used

likely available elsewhere too.

Used that on Slackware 12.0 and before (my 12.1 isn't up yet -- just installed, runs, needs a bit more configuring at this point).

cpan2tgz is not that difficult to use. I used it as root.

Resultant pkg also can be installed on another box with same ver. Slackware.

As to your .pm's from different ver's of Perl in different locations: I doubt that the next be an issue on Slackware (Slack seem to hardly or not use Perl to manage the sys ie some config's, etc. when parts of sys patch/update/change).

Different story on, what was it, Fedora Core something (2, 3, or 4) -- it's been a long while since I've even used Fedora. Back then, it's (Fedora distro) default in /usr/bin/perl

Well, (on that Fedora) I came along and built my own Perl from the latest source in /usr/local/bin/perl

Then, due that I didn't want to change my shebang lines in my own Perl scripts

I decided instead to symlink from /usr/bin/perl > /usr/local/bin/perl

All is fine, new Perl works super.

Until some new (security updates, etc.) patches to Fedora available.

Oop, we are broken now (the sys uses Perl for some of those to get updated/patched) and it happens incompatability and/or "not found"

From that, at least I learned what not to do.


jong357 10-13-2008 10:18 AM

I always get perl confused with python as far as external modules go.... Slackware's external perl modules are lumped into the perl package so ignore my comment about module rebuilds on a perl upgrade.

Any of your modules you should rebuild but Slackware doesn't ship any external perl modules (in their own package) to the best of my knowledge.... Probably why he does it. To cut down on the maintenance burden of a perl upgrade.

gnashley 10-13-2008 10:44 AM

src2pkg has a routine which packages perl modules, which should make it a lot easier to upgrade when needed. No special commands needed as it recognizes that the sources are a perl module and does the Right Thing.

Woodsman 10-13-2008 07:58 PM

Thanks Alan and Gilbert. Between cpan2tgz and src2pkg perhaps I can build a package that allows me to maintain these modules after each Slackware release. None of this is a show stopper, but more than likely in a couple of years I'll forget these modules and some perl script will break. Then I'll stare at the screen and begin using choice four-letter words. :)

acummings 10-14-2008 12:08 AM

some (user added .pm files, not Slack defaults) .pm files (Perl modules) got left behind in the Perl's 5.8.8 tree when Slack 12.1 got upgraded to Slack current which uses Perl 5.10.0


I guess with the binaries I would just make the directories in the new 5.10.0 tree and move them from the old 5.8.8 tree.
That often works **but** Perl does not always retain binary compatibility between or across different versions of Perl.

New features can get intro into [after all, it is Perl developers], which in turn, can make old code break (bring on incompatibility type of probs.)

Good news: perl[ver]delta.pod is our friend here, it's what tells the tale as the time and Perl versions move ever onward.

(Perl modules) Likely best if O.P. can track what it was that he had added to 5.8.8 and then go ahead and add the same or equivalent to Perl 5.10.0 in like fashion to as before when had been done the added modules onto 5.8.8 (repeat now on 5.10.0 what had been done onto 5.8.8)

perldelta is under "miscellaneous" (near half way down the web page)

important, next url lists an option to update .pm's when using the cpan shell. cpan2tgz merely is a wrapper that's wrapped around the cpan shell. AFAIK cpan2tgz accepts/returns anything that you can do in the cpan shell. I haven't upgraded my added on .pm Slack packages using cpan2tgz. But it should do it ie return an updated Slack .tgz .pm package.


acummings 10-14-2008 12:45 AM

n 1: a low triangular area where a river divides before entering a larger body of water

If I didn't know any better, I'd guess that that (delta) is a "transition place" of sorts. (in nearly any direction that you look so as to move from the spot where you are, change/transition *is* ahead). For instance, from river into breakwater into ocean. Or, from delta to up river. Or, head away from delta to the river bank area while staying near the ocean, head onto the beach, head on up the beach.

Cannot move/navigate from delta without change. There's that word, like the slackware changelog.

Sounds like Larry Wall to me (he's a linguist, right?). Also sounds like the crazy Perl community of which it's long since been that Larry wanted said community to have power whereby Perl 6 will be the *community's* (not Larry's) rewrite of Perl.


All times are GMT -5. The time now is 08:04 PM.