Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I

man -f <some string>

in addition to the expected Unix man pages, I get a bunch of odd looking entries that all have the header "User Contributed Perl Documentation". For example

man -f ip

in addition to things like

ip(4)            - Internet Protocol
ip2cc(1)         - lookup country from IP address or hostname
ipconfig(8)      - view and control IP configuration state
...

also lists things like

IP::Authority(3pm)       - fast lookup of authority by IP address
IP::Country(3pm)         - fast lookup of country codes from IP addresses
IP::Country::Fast(3pm)   - fast lookup of country codes by IP address
IP::Country::MaxMind(3pm) - Look up country by IP Address
IP::Country::Medium(3pm) - cached lookup of country codes by IP address and domain name

all of which are idenfified as "User Contributed Perl Documentation".

My 'man' path (from man --path), on OS X 10.8.2 is

/usr/local/git/share/man:/usr/share/man:/usr/local/share/man:/opt/X11/share/man:/usr/texbin/man

which is the same as it is on other machines that don't show these additional pages.

Where are these coming from? Can I limit my results to only Unix shell pages by default?

share|improve this question
    
i think it acts recursively! –  Mohsen Pahlevanzadeh Feb 4 '13 at 5:09
1  
man 1 string searches for string in Section 1 only. (Not sure about OSX, some platforms make that -s 1.) –  tripleee Feb 4 '13 at 7:11
    
... Though by the looks of your "acceptable" results, you only want to exclude section 3 really. –  tripleee Feb 4 '13 at 7:13
    
@tripleee: That doesn't seem to work with -f. Should it? –  raxacoricofallapatorius Feb 4 '13 at 20:48
    
IMHO it "should" but don't expect Apple to take your bug report very seriously. One of the drawbacks of a commercial OS vendor. –  tripleee Feb 5 '13 at 6:56
show 1 more comment

2 Answers

up vote 2 down vote accepted

Perl encourages library authors to include documentation in pod format in each source file. This documentation can be translater automatically to other formats including man pages, and many systems provide the documentation of installed Perl modules as man pages.

Man pages of Perl modules are in section 3pm. You can skip the whole of section 3 (library functions of any language) by passing the -S option to man and specifying a value that doesn't include 3, e.g.

man -S 1:8:4:5:6:7 foo

Setting the MANSECT environment variable has the same effect. I don't think there's a way to exclude section 3pm while retaining section 3 on OSX.

share|improve this answer
    
On OS X, -S appears to be ignored when used with -f. –  raxacoricofallapatorius Feb 5 '13 at 15:37
add comment

Those are manpages for Perl modules (dead giveaway: the 3pm is section 3 (library functions), *P*erl *M*odule), most of which are user-contributed to Perl (look at CPAN), together with their documentation.

share|improve this answer
    
Is there a way to "skip" them? Where are they located and how are they picked up, given my man path? –  raxacoricofallapatorius Feb 4 '13 at 5:10
    
For a long time, the footer text was hard-coded in pod2man. These days, if your Perl is not precambric (something like 5.6 I would guess) you can pass in an option to override it, but apparently the build script for these man pages don't do that. File a bug report and wait a couple of years, or perform severe overkill and rebuild them from source locally. –  tripleee Feb 4 '13 at 7:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.