Install Perl 5.8.8
[msysgit.git] / mingw / html / lib / Pod / ParseLink.html
blob6488286916a1610f9584ff86e51e5388122fd0b4
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>Pod::ParseLink - Parse an LE&lt;lt&gt;E&lt;gt&gt; formatting code in POD text</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;Pod::ParseLink - Parse an LE&lt;lt&gt;E&lt;gt&gt; formatting code in POD text</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsis">SYNOPSIS</a></li>
24 <li><a href="#description">DESCRIPTION</a></li>
25 <li><a href="#see_also">SEE ALSO</a></li>
26 <li><a href="#author">AUTHOR</a></li>
27 <li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li>
28 </ul>
29 <!-- INDEX END -->
31 <hr />
32 <p>
33 </p>
34 <h1><a name="name">NAME</a></h1>
35 <p>Pod::ParseLink - Parse an L&lt;&gt; formatting code in POD text</p>
36 <p>
37 </p>
38 <hr />
39 <h1><a name="synopsis">SYNOPSIS</a></h1>
40 <pre>
41 use Pod::ParseLink;
42 my ($text, $inferred, $name, $section, $type) = parselink ($link);</pre>
43 <p>
44 </p>
45 <hr />
46 <h1><a name="description">DESCRIPTION</a></h1>
47 <p>This module only provides a single function, parselink(), which takes the
48 text of an L&lt;&gt; formatting code and parses it. It returns the anchor
49 text for the link (if any was given), the anchor text possibly inferred from
50 the name and section, the name or URL, the section if any, and the type of
51 link. The type will be one of 'url', 'pod', or 'man', indicating a URL, a
52 link to a POD page, or a link to a Unix manual page.</p>
53 <p>Parsing is implemented per <a href="file://C|\msysgit\mingw\html/pod/perlpodspec.html">the perlpodspec manpage</a>. For backward compatibility,
54 links where there is no section and name contains spaces, or links where the
55 entirety of the link (except for the anchor text if given) is enclosed in
56 double-quotes are interpreted as links to a section (L&lt;/section&gt;).</p>
57 <p>The inferred anchor text is implemented per <a href="file://C|\msysgit\mingw\html/pod/perlpodspec.html">the perlpodspec manpage</a>:</p>
58 <pre>
59 L&lt;name&gt; =&gt; L&lt;name|name&gt;
60 L&lt;/section&gt; =&gt; L&lt;&quot;section&quot;|/section&gt;
61 L&lt;name/section&gt; =&gt; L&lt;&quot;section&quot; in name|name/section&gt;</pre>
62 <p>The name may contain embedded E&lt;&gt; and Z&lt;&gt; formatting codes,
63 and the section, anchor text, and inferred anchor text may contain any
64 formatting codes. Any double quotes around the section are removed as part
65 of the parsing, as is any leading or trailing whitespace.</p>
66 <p>If the text of the L&lt;&gt; escape is entirely enclosed in double quotes,
67 it's interpreted as a link to a section for backwards compatibility.</p>
68 <p>No attempt is made to resolve formatting codes. This must be done after
69 calling parselink (since E&lt;&gt; formatting codes can be used to escape
70 characters that would otherwise be significant to the parser and resolving
71 them before parsing would result in an incorrect parse of a formatting code
72 like:</p>
73 <pre>
74 L&lt;verticalE&lt;verbar&gt;barE&lt;sol&gt;slash&gt;</pre>
75 <p>which should be interpreted as a link to the <code>vertical|bar/slash</code> POD page
76 and not as a link to the <code>slash</code> section of the <code>bar</code> POD page with an
77 anchor text of <code>vertical</code>. Note that not only the anchor text will need to
78 have formatting codes expanded, but so will the target of the link (to deal
79 with E&lt;&gt; and Z&lt;&gt; formatting codes), and special handling of
80 the section may be necessary depending on whether the translator wants to
81 consider markup in sections to be significant when resolving links. See
82 <a href="file://C|\msysgit\mingw\html/pod/perlpodspec.html">the perlpodspec manpage</a> for more information.</p>
83 <p>
84 </p>
85 <hr />
86 <h1><a name="see_also">SEE ALSO</a></h1>
87 <p><a href="file://C|\msysgit\mingw\html/lib/Pod/Parser.html">the Pod::Parser manpage</a></p>
88 <p>The current version of this module is always available from its web site at
89 <a href="http://www.eyrie.org/~eagle/software/podlators/">http://www.eyrie.org/~eagle/software/podlators/</a>.</p>
90 <p>
91 </p>
92 <hr />
93 <h1><a name="author">AUTHOR</a></h1>
94 <p>Russ Allbery &lt;<a href="mailto:rra@stanford.edu">rra@stanford.edu</a>&gt;.</p>
95 <p>
96 </p>
97 <hr />
98 <h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1>
99 <p>Copyright 2001 by Russ Allbery &lt;<a href="mailto:rra@stanford.edu">rra@stanford.edu</a>&gt;.</p>
100 <p>This program is free software; you may redistribute it and/or modify it
101 under the same terms as Perl itself.</p>
102 <table border="0" width="100%" cellspacing="0" cellpadding="3">
103 <tr><td class="block" style="background-color: #cccccc" valign="middle">
104 <big><strong><span class="block">&nbsp;Pod::ParseLink - Parse an LE&lt;lt&gt;E&lt;gt&gt; formatting code in POD text</span></strong></big>
105 </td></tr>
106 </table>
108 </body>
110 </html>