<?xml version="1.0" encoding="windows-1252"?>
<node id="986940" title="Shortcut for referencing specific sections of CPAN documents" created="2012-08-12 03:35:38" updated="2012-08-12 03:35:38">
<type id="1036">
monkdiscuss</type>
<author id="968231">
Athanasius</author>
<data>
<field name="doctext">
&lt;p&gt;Fellow monks,&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s say I want to link to the documentation for the &lt;tt&gt;select&lt;/tt&gt; method in the [cpan://] module [mod://File::Tail]. This works:&lt;/p&gt;

&lt;p&gt;
&lt;c&gt;[href://http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm#select] =&gt;&lt;/c&gt; [href://http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm#select]
&lt;/p&gt;

&lt;p&gt;but it uses &lt;tt&gt;href&lt;/tt&gt;, which is for &amp;ldquo;General-Purpose Linking&amp;rdquo; (see [id://43037]). I would like to use one of the special &amp;ldquo;CPAN&amp;rdquo; links, but this:&lt;/p&gt;

&lt;p&gt;
&lt;c&gt;[mod://File::Tail#select] =&gt;&lt;/c&gt; [mod://File::Tail#select]
&lt;/p&gt;

&lt;p&gt;gives a CPAN page displaying &lt;b&gt;Not found&lt;/b&gt;. This also fails:&lt;/p&gt;

&lt;p&gt;
&lt;c&gt;[mod://IO::Handle#CONSTRUCTOR] =&gt;&lt;/c&gt; [mod://IO::Handle#CONSTRUCTOR]
&lt;/p&gt;

&lt;p&gt;although &lt;tt&gt;IO::Handle&lt;/tt&gt; is a core module documented in [doc://|perldoc]. This:&lt;/p&gt;

&lt;p&gt;
&lt;c&gt;[doc://IO::Handle#CONSTRUCTOR] =&gt;&lt;/c&gt; [doc://IO::Handle#CONSTRUCTOR]
&lt;/p&gt;

&lt;p&gt;does work, but seems not to be documented in [id://43037], which has, under &amp;ldquo;The Perl documentation&amp;rdquo;:&lt;/p&gt;

&lt;blockquote&gt;
Link to standard module docs: &lt;tt&gt;&amp;#91;&lt;b&gt;mod:&lt;/b&gt;//&lt;i&gt;name&lt;/i&gt;&amp;#93;&lt;/tt&gt;
&lt;/blockquote&gt;

&lt;p&gt;So,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is the canonical way to reference a section internal to a document on CPAN?&lt;/li&gt;
&lt;li&gt;Could the &lt;tt&gt;mod&lt;/tt&gt; shortcut be extended for this purpose?&lt;/li&gt;
&lt;li&gt;Should [id://43037] be updated to show &lt;tt&gt;doc&lt;/tt&gt; rather than &lt;tt&gt;mod&lt;/tt&gt; as the preferred shortcut for core modules?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In regard to (2), I find myself wanting such a shortcut quite often when contributing to [id://479].&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-968231"&gt;
&lt;p&gt;Athanasius&amp;emsp;&lt;font color=#008000&gt;&amp;lt;&amp;deg;(((&amp;gt;&amp;lt;&lt;/font&gt;&amp;emsp;&lt;i&gt;contra mundum&lt;/i&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
</data>
</node>
