seems to be done in one of those two hashes holding callbacks to handle [doc://...] links
update

ironically it's the first one

return( "http://perldoc.perl.org/", 'Perl documentation' ) unless $suf +fix; my $func= getVars(getNode('perl keyword list setting','setting')); if( $func->{$suffix} ) { "http://perldoc.perl.org/functions/$escsuffix.html" } elsif( $suffix =~ /^[\$\@%]/ ) { "http://perldoc.perl.org/perlvar.html#$escsuffix" } else { my ( $page, $anchor ) = split '#', $suffix, 2; my ( $uri, $title ) = ( "http://perldoc.perl.org/" ); $uri .= join '/', map $q->escape( $_ ), split /::/, $page; $uri .= '.html'; if( defined $anchor ) { $uri .= '#' . $q->escape( $anchor ); ( $title = $q->escapeHTML( $q->unescape( $anchor ) ) ) =~ y/-/ +/; } ( $uri, ( $title ) x!! defined $title ); }

update

a fix might look like (untested)

return( "http://perldoc.perl.org/", 'Perl documentation' ) unless $suf +fix; if( $suffix =~ /^[\$\@%]/ ) { "http://perldoc.perl.org/perlvar.html#$escsuffix" } else { my ( $page, $anchor ) = split '#', $suffix, 2; my ( $uri, $title ) = ( "http://perldoc.perl.org/" ); my $func= getVars(getNode('perl keyword list setting','setting')); $uri .= "functions/$page" if( $func->{$page} ); # handle functions $uri .= join '/', map $q->escape( $_ ), split /::/, $page; $uri .= '.html'; if( defined $anchor ) { $uri .= '#' . $q->escape( $anchor ); ( $title = $q->escapeHTML( $q->unescape( $anchor ) ) ) =~ y/-/ +/; } ( $uri, ( $title ) x!! defined $title ); }

update
maybe better like this
return( "http://perldoc.perl.org/", 'Perl documentation' ) unless $suf +fix; if( $suffix =~ /^[\$\@%]/ ) { "http://perldoc.perl.org/perlvar.html#$escsuffix" } else { my ( $page, $anchor ) = split '#', $suffix, 2; my ( $uri, $title ) = ( "http://perldoc.perl.org/" ); my $func= getVars(getNode('perl keyword list setting','setting')); if( $func->{$page} ) { # LanX: handle functions $uri .= "functions/$page"; # ??? do functions need to escaped? } else { # LanX: handle core modules and pragmas $uri .= join '/', map $q->escape( $_ ), split /::/, $page; } $uri .= '.html'; if( defined $anchor ) { $uri .= '#' . $q->escape( $anchor ); ( $title = $q->escapeHTML( $q->unescape( $anchor ) ) ) =~ y/-/ +/; } ( $uri, ( $title ) x!! defined $title ); }

update
regarding  $uri .= "functions/$page";  # ??? do functions need to escaped?

none of the functions listed in perl keyword list setting needs to be escaped. even -X works fine

comments???

Is there a test suite?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice


In reply to Re: Error/Limitation: with anchor-links into functions like [doc://function#anchor] (updated) by LanX
in thread Error/Limitation: with anchor-links into functions like [doc://function#anchor] by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.