-
Notifications
You must be signed in to change notification settings - Fork 34
Document the default value for the -o switch #59
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
Conversation
I found this answer using Unix 'strace'. P.S., maybe write -o bla, instead of -obla, as that works too, unlike -M, which doesn't tolerate whitespace.
There isn't one default. Different situations will choose differently and there are many things that go into it. Start with However, we're probably going to revert to preferring ToMan (#36). If you wonder what perldoc is doing, give it the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are going to specify a default value for a switch, it will be next to the switch's documentation. However, there isn't a single value we can document for -o. It might be useful to have a longer section that is just about how Perldoc chooses a formatter, but that's some serious legwork with lots of weird situations.
You get ToMan, I get ToText
Same (except for the error) with perldoc -D perldoc. |
Yes, we get different things. Note that you also have a different pager as the first in the list. That's the one from the perl config (check Let me know if you'd like to map out that decision process. |
Well I guess the most surprising thing is perldoc is doing a deep investigation into things outside of itself, causing different users to get different results for the same commands. I sure hope the man page makes this clear. (One usually is just used to commands merely checking their own .config/init_files.) |
Yes, there are various ways we can improve the documentation, but we have to understand what is actually happening and document that correctly,. perldoc does a lot of work to give people the best experience it can across many different platforms and situations with no special config of its own. It's a bit of beast that has broken the spines of more than a few developers. I do want to improve the docs, but things are not so simple that we can drop a parenthetic note into docs that explains what's going on. I'm rejecting this PR because it's not correct and it sounds like you aren't improve it. A different patch that addresses the things I pointed out is still welcome though. |
I found this answer using Unix 'strace'.
P.S., maybe write -o bla, instead of -obla, as that works too, unlike -M, which doesn't tolerate whitespace.