Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Re: (tye)Re: Getting perldoc to recognize different perl versions by clwolfe
in thread Getting perldoc to recognize different perl versions by clwolfe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-23 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found