oakley has asked for the wisdom of the Perl Monks concerning the following question:

Man, im here to tell ya, nothing ever goes the way I want it when upgrading. Here's the scoop:

I was installing a few modules and CPAN told me there was a new version and to run an upgrade for "Bundle::CPAN" which I did. Well, it appears (which is now known to me) that the bundle actually upgrades perl... I was running 5.005 so I was due to upgrade anyways. Well, it did it's thing which took like an hour in which it installed quite a few modules, and then upgraded perl itself.

The kicker now is that when I try to read the docs on a module, I get an error from perldoc and honestly dont have a clue how to fix this and im getting quite pissed off. Here is the error:

oakserver:/usr/local/lib/perl5/5.6.1# perldoc Net::Telnet syntax error at warnings.pm line 306, near "{^" syntax error at warnings.pm line 311, near "{^" BEGIN failed--compilation aborted at /usr/local/bin/perldoc line 5. oakserver:/usr/local/lib/perl5/5.6.1#

Another "fun" issue is that if I am not in the actual base directory for the modules, and then I run perldoc on something, I get an error as well:

oakserver:~# perldoc Net::Telnet Can't locate warnings.pm in @INC (@INC contains: /usr/lib/perl5/5.005/ +i386-linux /usr/lib/perl5/5.005 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl /usr/lib/ +perl5 .) at /usr/local/bin/perldoc line 5. BEGIN failed--compilation aborted at /usr/local/bin/perldoc line 5. oakserver:~#

Uuhhh... why didnt it change @INC when it did the install? Why is perldoc breaking now overall? Anyone know what the heck I did and how I go about fixing these problems? Im dyin here....

Thanks in advance

-oakley
Embracing insanity - one twitch at a time >:)

Replies are listed 'Best First'.
Re: install of perl 5.6.1 and new issues
by sachmet (Scribe) on Apr 13, 2001 at 23:49 UTC
    Probably because by default it installs as /usr/local/bin/perl, but perhaps your /usr/bin/perl is still 5.005, which is, in fact, what it looks like. Try symlinking /usr/bin/perl to /usr/local/bin/perl and see if that fixes the issue. You can always 'perl -v' to see what version of Perl is running.
      You, sir, kick all nine kinds of ass! That worked perfectly! The version of perl that was in /usr/bin was 5.005_03, but was a symlink to /etc/alternatives/perl and nowhere else. Dont exactly understand that one, but hey... as long as things are back up and working, who cares?!. Thanks many many times over.

      Now, anyone care to elaborate on how exactly @INC and perldoc play together? That doesnt make sense to me... does it (perldoc) call to the perl binary first to get the contents of @INC and thus the path to the modules??

      -oakley
      Embracing insanity - one twitch at a time >:)
        Sure...
        tetsujin 13> /usr/bin/head -3 /usr/bin/perldoc #!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0;
        perldoc, oddly enough, is written in perl, and uses /usr/bin/perl to run itself. So when perl itself has issues, so does perldoc. Many of the additional tools that come with perl are written in perl, such as s2p. You can look through these to see some of Larry and Tom's coding styles, as well as Other Ways To Do It.
      i like when i upgraded, mod_perl and apache broke. this, after i spent about a month trying to make php and mod_perl work together (finally got it to go). bah.