Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] All man pages' SEE ALSO sections should have standard section numbers added #17309

Closed
jidanni opened this issue Nov 18, 2019 · 9 comments
Closed

Comments

@jidanni
Copy link
Member

jidanni commented Nov 18, 2019

Just the other day we were having an argument about if e.g.,

$ man perldoc

SEE ALSO
perlpod, Pod::Perldoc

should instead say

SEE ALSO
perlpod(1), Pod::Perldoc(3perl)

I.e., all perl man pages' SEE ALSO sections should have standard numbers attached to them,
like
$ man cat
has.

@Grinnz
Copy link
Contributor

Grinnz commented Nov 18, 2019

No, because these are meant to link to other perldocs, whereas links to manpage-style sections are handled differently.

@Leont
Copy link
Contributor

Leont commented Nov 18, 2019

No, because these are meant to link to other perldocs, whereas links to manpage-style sections are handled differently.

Yeah, the system isn't designed for this, sadly

@eserte
Copy link
Contributor

eserte commented Nov 19, 2019

A possible change would be the addition of manpage section identifications to all of the L<...> links. However this would change the type of such links, and some Pod renderers (like Tk::Pod) would do different things then.

But I think it should be possible to write a pod2man variant which does some heuristics to add manpage sections to links e.g. everything which "looks" like a perl module or can be found in @INC gets the (3) suffix (or on some systems (3pm) or so), otherwise a (1) suffix.

@Grinnz
Copy link
Contributor

Grinnz commented Nov 19, 2019

But I think it should be possible to write a pod2man variant which does some heuristics to add manpage sections to links e.g. everything which "looks" like a perl module or can be found in @INC gets the (3) suffix (or on some systems (3pm) or so), otherwise a (1) suffix.

Such would be possible but it could only be an imperfect heuristic, because of modules that look like "lib" or documentation like "perl".

@jidanni
Copy link
Member Author

jidanni commented Nov 20, 2019 via email

@Leont
Copy link
Contributor

Leont commented Nov 20, 2019

Maybe just the
/usr/share/man/man*/*.gz
files could have the standard section numbers added to them.

That sort of os/distribution specific logic sounds like a nightmare to maintain.

@Grinnz
Copy link
Contributor

Grinnz commented Nov 20, 2019

Maybe just the
/usr/share/man/man*/*.gz
files could have the standard section numbers added to them.

That sort of os/distribution specific logic sounds like a nightmare to maintain.

I would add, this would be something an OS distribution could patch in their packages if desired, and that would be the level at which you'd know the pertinent information of what section any particular link will be in.

@jidanni
Copy link
Member Author

jidanni commented Nov 21, 2019 via email

@Leont
Copy link
Contributor

Leont commented Nov 21, 2019

All I know is on Debian
$ dlocate perldoc.
perl-doc: /usr/share/man/man1/perldoc.1.gz
perl-doc: /usr/share/perl/5.30.0/pod/perldoc.pod

A major problem with this logic, is that it assumes the module/script that is referred to is installed on the machine that builds the package. This is not a safe assumption.

@jkeenan jkeenan closed this as completed Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants