2

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?

6
  • i think it acts recursively! Commented Feb 4, 2013 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
    Commented Feb 4, 2013 at 7:11
  • ... Though by the looks of your "acceptable" results, you only want to exclude section 3 really.
    – tripleee
    Commented Feb 4, 2013 at 7:13
  • @tripleee: That doesn't seem to work with -f. Should it?
    – orome
    Commented Feb 4, 2013 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
    Commented Feb 5, 2013 at 6:56

2 Answers 2

2

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.

1
  • On OS X, -S appears to be ignored when used with -f.
    – orome
    Commented Feb 5, 2013 at 15:37
1

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.

2
  • Is there a way to "skip" them? Where are they located and how are they picked up, given my man path?
    – orome
    Commented Feb 4, 2013 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
    Commented Feb 4, 2013 at 7:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .