Commits

Shlomi Fish committed 827ba2a

Add some cpan_dist macros.

Comments (0)

Files changed (3)

lib/cpan_dists.wml

 
 </define-tag>
 
+<define-tag cpan_mod whitespace="delete" endtag="required">
+<preserve m />
+<set-var %attributes />
+<a href="http://metacpan.org/module/<get-var m />">%body</a>
+<restore m />
+</define-tag>
+
+<define-tag cpan_self_mod whitespace="delete">
+<preserve m />
+<set-var %attributes />
+<cpan_mod m="<get-var m />"><get-var m /></cpan_mod>
+<restore m />
+</define-tag>
+
+<define-tag cpan_dist whitespace="delete" endtag="required">
+<preserve d />
+<set-var %attributes />
+<a href="http://metacpan.org/release/<get-var d />">%body</a>
+<restore d />
+</define-tag>
+
+<define-tag cpan_self_dist whitespace="delete">
+<preserve d />
+<set-var %attributes />
+<cpan_dist d="<get-var d />"><get-var d /></cpan_dist>
+<restore d />
+</define-tag>
+
+<define-tag cpan_b_self_dist whitespace="delete">
+<preserve d />
+<set-var %attributes />
+<cpan_dist d="<get-var d />"><b><get-var d /></b></cpan_dist>
+<restore d />
+</define-tag>
+
 <define-tag cpan_homepage whitespace="delete">
 <preserve who />
 <set-var %attributes />

t2/lecture/Perl/Lightning/Test-Run/updates/2006-05-09/index.html.wml

 #include '../template.wml'
+#include "cpan_dists.wml"
 
 <latemp_subject "Test::Run - Update for 9-May-2006" />
 
 
 <p>
 The colour-summaries lines were released on CPAN as
-<a href="http://search.cpan.org/dist/Test-Run-Plugin-ColorSummary/">Test-Run-Plugin-ColorSummary</a> and
-<a href="http://search.cpan.org/dist/Test-Run-CmdLine-Plugin-ColorSummary/">Test-Run-CmdLine-Plugin-ColorSummary</a>.
+<cpan_self_dist d="Test-Run-Plugin-ColorSummary" />
+and
+<cpan_self_dist d="Test-Run-CmdLine-Plugin-ColorSummary" />.
 They now allow configuring the colour in which the summary would be displayed.
 </p>
 
 <h2>Test-Run-TAP-Model</h2>
 
 <p>
-The <a href="http://search.cpan.org/dist/Test-TAP-Model/">Test-TAP-Model</a>
+The <cpan_self_dist d="Test-Tap-Model" />
 was adapted to Test::Run, after a talk with one of its developers.
 </p>
 

t2/links.html.wml

 a collection of facts about the most, well, most something, geek in existence.
 </li>
 <li>
-<a href="http://search.cpan.org/src/COSIMO/Acme-24-0.01/fortune/jackbauer">Jack
+<a href="https://metacpan.org/source/COSIMO/Acme-24-0.04/fortune/jackbauer">Jack
 Bauer facts</a> (in <a href="$(ROOT)/humour/fortunes/">UNIX
 fortunes format</a>) - also about a tough man.
 </li>