Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

perldoc PATH

by Anonymous Monk
on Jul 11, 2013 at 13:46 UTC ( #1043728=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Is it possible to specify PATH to a higher level directory and have perldoc search for the pod files under all sub directories?

for example, if I had a directory structure like

root/sub1/sub2/file.pod
and I set the path to
export PATH=/root
will perldoc do a recursive search for the pod file? If not is there a way to make this happen?

Replies are listed 'Best First'.
Re: perldoc PATH
by toolic (Bishop) on Jul 11, 2013 at 14:03 UTC
    I don't think perldoc can recursively search the PATH directories. It does have a -r switch which can recursively search the @INC directories:
    perldoc -h -r Recursive search (slow)
    If you really need this, I guess you could append all the PATH dirs to @INC.

    See also perldoc -D

      Thanks. That works well. Bit slow (I guess because of the recursive search), but works OK.

      I am also going to generate 'man' files using pod2man. Is there a similar recursive search for UNIX man command as well.

      I also see that you can do a 'man' instead of perldoc for installed perl modules and the man page appears identical to perldoc output. For example

      man File::Path perldoc File::Path
      generate similar looking output.

      I do see that the man files are in a single directory. Does that mean I have to put the 'man' files in a single directory?

      Thanks

        Is there a similar recursive search for UNIX man command as well.
        Check the docs:
        man man
        I also see that you can do a 'man' instead of perldoc
        As documented in perldoc.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1043728]
Approved by Corion
Front-paged by toolic
help
Chatterbox?
[perldigious]: Also coincidentally, I'm currently in the middle of a winter storm that has dropped 1 foot of snow and is expected to drop another. I might have to adapt this for customers/vendors who come visit and put it at the beggining of every presentation I give.
[Discipulus]: the photo was removed... Cyrano de Berjerac was not of the same idea..
[stevieb]: perldigious: video near our hq in Montreal. Here in Calgary, it's -28c... we've only got 3" of snow so far, but there are several feet in the mountains already
[perldigious]: Snowshoeing time stevieb? I need to buy a pair so I can walk my German Shepherd properly through the country.
[stevieb]: yeah, I snowshoe a fair amount in the mountains. I also use spikes similar to these very often as well
[perldigious]: Discipulus: alternate link

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2016-12-06 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (112 votes). Check out past polls.