Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

(tye)Re: Getting perldoc to recognize different perl versions

by tye (Sage)
on Apr 17, 2001 at 16:34 UTC ( [id://73231]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Getting perldoc to recognize different perl versions

That should work.

The only thing I found that makes sense to me that might be breaking it is the

eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0;
trickery that is in my copy of perldoc.

Perhaps you broke the #! line or are using a shell that doesn't honor them.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: Getting perldoc to recognize different perl versions
by clwolfe (Scribe) on Apr 17, 2001 at 17:47 UTC
    Aha!
    As many people have responded, and as I noted in my original posting, the shebang of perldoc was the first place to look, which I had already changed.

    I then tried perldoc -v -f foo to see where it was looking. Lo and behold, perldoc-5.7.0 said it was looking in /usr/local/lib/perl5/5.7.0 (etc). Funny...so I tried a more pragmatic test:

    perldoc-5.005 -f our No documentation for perl function 'our' found perldoc-5.7.0 -f our ('our'section of perlfunc appears)
    OK, so it seems to be working! But the footer of the paged output says perl5.6.1, regardless of the actual documentation being displayed! Why???

    So, reading perldoc's sourcecode, we find on line 328, a backtick system call to pod2man. AHA!! Of course, pod2man-VERSION's shebang points to /usr/local/bin/perl, which is really 5.6.1 . pod2man must get that version number from its perl interpreter (reasonably so), and then sticks it in the footer of the output.

    So, I edited perldoc-VERSION to call pod2man-VERSION, and edited pod2man-VERSION to use perl-VERSION in the shebang line.

    Mystery solved. Thanks for all of the responses, and I hope that others have found this to be educational.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://73231]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.