http://www.perlmonks.org?node_id=1082526

I finally found out how to link directly to a node on cpan like this [mod://Email::Stuffer]. When searching Perlmonks for how to link to CPAN modules, the node I always landed on before, How do I link to modules on CPAN?, shows how to link to a cpan search for the module which requires another click to get to the module. The node has another link to What shortcuts can I use for linking to other information? but that always seemed irrelevant since I wanted to link to cpan not "other information".

Would it make sense to change [cpan://Net::Syslog] to [mod://Net::Syslog] and modify the text to the other node such as "For more information about linking to CPAN go to What shortcuts can I use for linking to other information?."

Replies are listed 'Best First'.
Re: propose updating node about linking to cpan modules
by ww (Archbishop) on Apr 16, 2014 at 15:50 UTC

    ... or, better yet, add Lotus1's proposed link, direct to any specified modules and default it to search if no module matches or no argument specified.
    ALT: keep existing the add Lotus1's proposed link without the above elaboration.

    Come, let us reason together: Spirit of the Monastery
Re: propose updating node about linking to cpan modules
by Anonymous Monk on Apr 16, 2014 at 18:35 UTC

      Since the node is in the FAQ section it seems like a specific answer to the most frequently asked question about linking to CPAN makes sense. I just thought it was the wrong answer. Maybe it was the wrong question.

Re: propose updating node about linking to cpan modules
by kcott (Archbishop) on Apr 17, 2014 at 00:14 UTC

    G'day Lotus1,

    That's not a page I've used much (if at all); however; here's some thoughts on your proposal.

    How do I link to modules on CPAN?

    Instead of just changing what's already there, I think adding more link types might be a better way to go.

    So: keep [cpan://...]; add [mod://...]; maybe add [dist://...]; and consider adding some or all of the other 10 link types shown in the CPAN section of the Shortcuts page.

    What shortcuts can I use for linking to other information?

    I've always considered this to be a rather wordy node title. Furthermore, I don't really think it truly reflects the node's contents.

    Although it says "shortcuts", this is actually the preferred markup for all links.

    I agree the "other information" part suggests something other than what was originally intended: in your case, it suggests "other than CPAN"; elsewhere, it might suggest "external links".

    Perhaps "How do I add a link to my post?" might be a better choice. This uses the same format as many of the links in "Posting on PerlMonks" (e.g. "How do I change/delete my post?"); in fact, it would probably be a useful addition to that page.

    [In the interests of full disclosure, I will admit that, in order to get the "CPAN section of the Shortcuts page" link above, I needed to use: <a href="?node_id=43037#cpan">CPAN section of the Shortcuts page</a>. A [...] style link could not achieve this (or, at least, I couldn't find any way to do it, either by experimentation or documentation).]

    -- Ken

      A [...] style link could not achieve this
      [href://?node_id=43037#cpan] -> ?node_id=43037#cpan
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

        Thanks, and I see it is documented in Shortcuts: General-Purpose Linking (markup: [href://?node_id=43037#general|Shortcuts: General-Purpose Linking]).

        As tye indicated earlier, a fix such that [id://43037#general|...] works the same would be good.

        -- Ken

        And did you actually test the link that you produced?

        - tye        

Re: propose updating node about linking to cpan modules
by graff (Chancellor) on Apr 17, 2014 at 02:42 UTC
    I actually wasn't aware (or maybe I just forgot so long ago…) that we could use [mod://...] to link directly to specific module pages. That's good to know.

    But I always thought that the way [cpan://...] links work was the "preferred" way, because you not only get the targeted module itself at the top of the search results, but you also get a list of other modules that are likely to be closely related, and that's usually quite informative and helpful.

      The mod:// variant is useful if you a talking about a specific module (bug, detail of use, example, etc.) and the cpan:// variant is useful when exploring solutions to a problem where there may be more than one applicable module.

      I've used both variants, but use mod:// much more than cpan://. I think cpan:// is generally over used because it provides a link that is almost always at least one step away from the page of interest to the audience for the link.

      Perl is the programming world's equivalent of English