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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |