in reply to Perl 6 links

Actually, it's high time we had a generic, extensible way to make common shortcuts to other sites. This problem is already well in hand in the wiki world. Most wiki engines support "InterWiki" links, which typically use a syntax like [Wiki:Page|link text]. The engine translates this into a live link based on a lookup table (map): for each wiki name (e.g. "Meatball"), it gets a URL template, substitutes or appends the page name, and uses the given link text.

It should be clear that there is nothing really wiki-specific about this technique. It is a general markup-shortening device for hyperlinks. Everything (and thus PerlMonks as well) has adopted the same philosophy to short-hand markup.

Replies are listed 'Best First'.
Re^2: Perl 6 links
by theorbtwo (Prior) on May 14, 2005 at 00:24 UTC

    PM alreayd has something like this -- just consider every different wiki out there a different psudoprotocol. Works the same way as what you proposed, except with a :// instead of a :. Is there some other difference I am not seeing? PM's isn't a simple table of templates, but rather a dispatch table, but that allows more complex mappings (which are used in some cases -- for example doc:// acts differently if the argument begins with perl.


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      OK; I'm just proposing that we make a concerted effort to get on board the InterWiki wagon. It will mean significant additions to the shortcut handler settings, and would probably necessitate additional logic code for genericity. (See scrottie's excellent overview of the issues at Was, a Wiki for Perl.)

      We should also give mind to playing the other side of the InterWiki game as well, though there may be nothing more to this than is already supported by our http://perlmonks.org/?node=search,terms syntax.