Thought I might share my experience this morning in the hopes it can save others some aggravation.

I'm running Fedora 8, and after installing the daily batch of updates, Spreadsheet::ParseExcel broke with the error that weak references were not supported in this version of Perl. A little bit of poking around, and it looks like the Fedora update included an update for Perl that uses an implementation of Scalar::Util that does not support weak references.

Problematically, the version of the cpan script that I had (not sure if it was updated or not) doesn't recognize the -f option, and so you can't force the install that way. Of course, it also sees that Scalar::Util is up to date.

The solution was to enter a cpan shell, and then run force install Scalar::Util. After it rebuilt, Spreadsheet::ParseExcel seems to be running like a champ.

Replies are listed 'Best First'.
Re: Rebuilding Scalar::Util after Fedora Update
by perrin (Chancellor) on Dec 04, 2007 at 20:13 UTC
    It's definitely problematic to mix Perl modules from your OS vendor with ones from CPAN. If you want to prevent yum from doing this to you again, you can add something like "exclude perl" to your yum.conf. Of course you can still run into bad situations where something else lists a Perl upgrade as a dependency, but at least it won't surprise you.

      Or install a separate "application" Perl in a different directory and then it doesn't matter what the OS and package manager install.

      (And is it just me or is this recommendation not regularly coming up repeatedly every n weeks . . . ? I mean not two weeks ago I said practically the same thing. Probably means the tutorial draft that was in response to is needed :)

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

Re: Rebuilding Scalar::Util after Fedora Update
by Hercynium (Hermit) on Dec 04, 2007 at 21:48 UTC
    Something I've recently discovered, if it hasn't been brought up before is a utility that makes RPM packages from a CPAN distro. I've only been using it for a week and it's already becom invaluable on a server where we're forced to run RHEL 3 (whose default perl is a somewhat broken 5.8.0 setup) because a vendor's application doesn't run on anything better.

    http://perl.arix.com/cpan2rpm/

    The info on the page is a little disorganized, but read through and you should be able to find the RPM, download, install and start making packages of your important modules!

    I found that having a complete C/C++ toolchain installed helps big time.
Re: Rebuilding Scalar::Util after Fedora Update
by locked_user sundialsvc4 (Abbot) on Dec 05, 2007 at 19:30 UTC

    What I would do, indeed, is to install the module separately, into your own PERL5LIB directory using your own CPAN-settings. In other words, leave the distro writer's environment just as they expect it.

    It has furthermore been my experience (I don't know about your distro...) that many distro vendors don't use CPAN. So, if you do, there could be conflicts.

    When you're doing your stuff, put it in your directory of choice and make PERL5LIB (and CPAN's "PREFIX=") point to it. When doing their stuff, use their tools and make sure that PERL5LIB is defined to whatever they set it to; or completely undefined if they don't set it.

Re: Rebuilding Scalar::Util after Fedora Update
by submersible_toaster (Chaplain) on Dec 06, 2007 at 04:56 UTC

    ++starX for giving this some attention. It has been my experience that Weaken support has been borked forever in RHEL4 , fixed in RHEL5 and seems to go in and out of Fedora. Sadly you can raise the ire of the sys admins when force installing CPAN modules that are already provided as system RPM's (ruins the update path). My 2c , redhat's perl coverage and 'goodness' is pretty sub-par.

    <update>Task::Weaken is good for listing as a dep if you truely want weaken, no if's but's or maybe's</update>

    I can't believe it's not psellchecked