-
Notifications
You must be signed in to change notification settings - Fork 61
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
Parenthesize link text #151
base: master
Are you sure you want to change the base?
Conversation
This makes it clearer as to what is happening
So I don't think this can be changed in this way. |
IMO it would be better to write your own custom link text when the default is not grammatically suitable. e.g. |
@haarg, thanks for finding that. perlpodspec says that pod can be written in any language that Encode handles. It can't be the Right Thing to require the insertion of English into a document written in some other language, whose readership potentially knows nothing of English. I really doubt that this consequence of that requirement was considered when writing it. I skimmed perlpodspec, and saw no other instance where any language-specific text is to be inserted. I assert then that the spec is defective and therefore should be changed. Whether that is doable or not, I don't know. @allisonrandal @theory @rjbs, please weigh in. Any change should not require parsers to change their current behavior to correspond. But I do think the current method should be listed as discouraged |
@Grinnz yes, but people won't always do that, and so there should be a reasonable default when they don't. A default that minimizes confusion to the (innocent) reader. |
The current default is reasonable, as you showed an example of. It doesn't need to be reasonable in every possible case. |
And further, there is a significant amount of documentation now existing which relies on the current default for its presentation, which any change could look less appealing, so would be a regression. |
Parenthesis used in that way is also not something that is universal across languages. I'm not sure that there is an appropriate alternate default formatting. While ideally we shouldn't prioritize english, most Pod documentation is currently written in english and much of it has been written with the assumption that these links will be formatted using "in". A Pod::Simple subclass can change how these are formatted. Possibly we could add that as a core feature not needing a specific subclass to enable. |
Whenever I see something in the documentation like:
I go "Huh"
That
in perlfunc
is a non-sequitur. On the other hand, the text could have been written aswhich makes sense.
For years, I I toyed with solutions that didn't involve Pod::Simple learning to parse English (and French or whatever) to decide what text to insert that makes it clear as to what is happening. And finally, I came up with this one which makes it
This isn't ideal, but it is a lot better than currently. Note that the insertion of
in
presumes that the pod is in English. That is bad right off the bat, and maybe we should ditch it, and make itVarious tests have hard-coded the precise text expected the generated pod output to be, and those fail this PR. A few are in cpan modules shipped with blead. I chose not to fix those until the final PR is nailed down