Here we go

<!-- ========================== PM LINK FIXER ========================== --> <!-- please disable after successful testing --> <h5> Testlinks </h5> [cpan://Data::Dump] <p> [mod://Data::Dump] <p> [http://www.perlmonks.net|www.perlmonks.net] <p> <script><!-- /* redirect links - avoid log out: redirect perlmonks domains to current one! - cpan -> metacpan */ (function (do_log){ var log = function (html){ if (do_log) document.writeln(html); } var fixes=''; var doc_host=document.location.hostname; for (var i in document.links) { var link_host = document.links[i].hostname; var link_href = document.links[i].href; var link_search = document.links[i].pathname; var link = document.links[i]; /* redirect links from other perlmonks domains to current one! * +/ if ( link_host && link_host != doc_host && link_host.match(/^(www\.)?perlmonks.(org|net|com)$/) ) { fixes += '<li> #'+i+' was '+link_host+'</li>\n'; document.links[i].hostname = doc_host; } /* redirect links from cpan to metacpan */ if ( link_host && link_host == 'search.cpan.org' ) { fixes += '<li> #'+i+' fixing '+link.href+'</li>\n'; if ( link.pathname == '/perldoc' ) { link.hostname = 'metacpan.org'; link.pathname = '/module/'+ link.search.split('?')[1]; link.search=''; link.protocol='https:'; } else if ( link.pathname == '/search' ) { link.hostname = 'metacpan.org'; link.search='?q'+link.search.split('&query')[1]; } } } if (fixes) { log('<h5>Fixed Links</h5><small><ol>'); log(fixes); log('</ol></small>'); } })(true); --></script>

Logging and Testlinks should be disabled after successful testing.

Cheers Rolf

(addicted to the Perl Programming Language)


In reply to Re^3: Proposal - Update shortcuts pointing to cpan.org to link to mcpan.org # Nodelet Hack by LanX
in thread Proposal - Update shortcuts pointing to cpan.org to link to mcpan.org by marto

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.