How about [perl6://A6]? Is that acceptable? Can you review my patch? ;-)

Update: demerphq recommends I post the code here. Note that in the original code, this has to be one line, but, in the interests of readability, I'm going to insert some whitespace.

my ($type,$num) = $nodeloc =~ /^([aAeEsS])(\d{1,2})$/; if (defined $type and defined $num) { $type = uc $type; $num = sprintf q[%02d], $num; my %map = ( A=>['apo', 'Apocalypse'], E=>['exo', 'Exogesis'], S=>['syn', 'Synopsis'] ); $title ||=$map{$type}[1] . ' ' . $num; return qq[<a href="http://dev.perl.org/perl6/doc/$map{$type}[0]/$typ +e$num.html">$title</a>]; } else { return qq([$prefix://$nodeloc]) } }

Update 2: FYI, for those non-pmdevils who can't find out what the variables are. Although it should be obvious, $nodeloc is the part after the ://, but before the |, while $title is the part after the |.

Update 3: My submitted patch has changed to [aes://s03]. I am not that into perl 6 (I have a few questions which I'm likely to post about perl 6 when I get the time to look at it more closely) and can accept that "aes" is an accepted abbreviation here. That said, part of the point of these links are ways to make it easy to write nodes. That would include "shortcuts" such as lazily ignoring case, or skipping the leading zero.

I don't want to go away from using the [$prefix://$nodeloc] convention if only that it's way more work (beyond my skills as a pmdevil anyway), and I'd rather see something than nothing. As for the comparison to perlop - using [perlop] gets you a link to out-of-date documentation vs using [doc://perlop]. Thus, we're sticking to that, and getting [aes://s03] to be the link (which is more likely to be up-to-date) rather than [S03] (which is more likely to fall out of date when no one keeps it updated).


In reply to Re^2: Perl 6 links by Tanktalus
in thread Perl 6 links by Juerd

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.