<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title><![CDATA[Perl 6: Smart Linking]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?smart_linking</link>
<description></description>
<pubDate>Tue, 16 Dec 2008 19:16:44 -0000</pubDate>
<webMaster>synedra@gmail.com</webMaster>
<generator>Socialtext Workspace v2.14.7.2</generator>

<item>
<title><![CDATA[Smart Linking]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?smart_linking</link>
<description><![CDATA[<div class="wiki">
<p>
Smart Links refer to a special syntax used in the test suite which connect a particular part of a test script with a specific part of the <a target="_blank" title="(external link)" href="http://feather.perl6.nl/syn/">Perl 6 specification<!-- wiki-renamed-hyperlink "Perl 6 specification"<http://feather.perl6.nl/syn/> --></a>.</p>
<h2 id="smart_links_example">Smart Links Example</h2>
<p>
A smart link looks like this in a test script:</p>
<pre>
 # L&lt;S29/Math::Trig&gt;
</pre>
<br /><p>
After submitting this to the Subversion repository, after a few minutes a cron script will update a copy of the Specification which references these links. See the <a target="_blank" title="(external link)" href="http://feather.perl6.nl/syn/S29.html#Math%3A%3ATrig">Math::Trig spec<!-- wiki-renamed-hyperlink "Math::Trig spec"<http://feather.perl6.nl/syn/S29.html#Math%3A%3ATrig> --></a> for an example.</p>
<h2 id="benefits_of_smart_links">Benefits of Smart Links</h2>
<p>
Smart links are especially valuable for a language that is in development. The help answer these important questions:</p>
<ul>
<li><strong>Has this feature been tested?</strong> If you don't see references to tests from the spec, there's a possibility the feature is not only untested, but unimplemented!</li>
<li><strong>Are there duplicates tests for this feature?</strong> If you see more than one test script linked in one place, it's possible there are duplicate tests, and the tests suite can be simplified.</li>
<li><strong>Is there a spec for this feature?</strong> On the other hand, if you find a test <em>without</em> a smart link, it may simply not have one yet, or the feature may be unspec'ed. It was discovered that the basic function &quot;say&quot; did not have a formal definition through this kind of review.</li>
</ul>
<h2 id="smart_linking_status">Smart Linking Status</h2>
<p>
(generated using smartlinks.pl --check <strong>/</strong>.t from within ~/pugs/t/spec)</p>
<p>
As of December 16th, 2008 we now have info: 659 smartlinks found and 0 broken in 411 test files (60 test files had no links).</p>
<p>
As of September 11th, 2006, 263 test scripts have at least one smart link, but 349 do not. <br />
Help wanted!</p>
<h2 id="how_to_get_the_test_suite">How to get the Test Suite</h2>
<p>
The test suite currently lives in the pugs repository, run the following from your parrot download and you'll have the full test suite.</p>
<pre>
﻿cd languages/perl6 &amp;&amp; make t/spec
</pre>
<br /><h2 id="how_to_help_with_smart_linking">How to help with smart linking.</h2>
<p>
To help with this, you mostly just some motivation to help, and commit access<br />
to the pugs tree. Ask for it on #perl6 if you don't have it.</p>
<p>
<tt>perldoc util/smartlinks.pl</tt> explains the details. Here are practical tips to get started.</p>
<p>
1. Review the complete list of files with no smart links:</p>
<pre>
grep -RL 'L&lt;' t/* | $PAGER
</pre>
<br /><p>
2. Pick a directory that needs work. For example, in builtins/lists, 11 files need updated now.</p>
<pre>
cd builtins/lists
</pre>
<br /><p>
3. Open these files</p>
<pre>
$EDITOR `grep -L 'L&lt;' *.t`
</pre>
<br /><p>
4. Add at least one appropriate smart link, possibly using the <a target="_blank" title="(external link)" href="http://feather.perl6.nl/syn">online specification<!-- wiki-renamed-hyperlink "online specification"<http://feather.perl6.nl/syn> --></a> as a reference. The nice thing about working in one directory at one time, is that all of the smart links in the directory me be similar.</p>
<p>
5. Check your smart links</p>
<pre>
~/pugs/util/smartlinks.pl --check *.t
</pre>
<br /><p>
Hopefully, you'll get some useful debugging feedback if there is a problem. You can also specify --fast if you don't want to update your local copy of Synopses at every run.</p>
<p>
6. Commit your work!<br />
Usually this is <tt>svk commit</tt> or <tt>svn commit</tt>.</p>
<p>
Ask for help on the #perl6 IRC channel if you get stuck.</p>
<h2 id="a_simple_script_to_help">A simple script to help</h2>
<p>
Somewhere in your path create a file called check_links and chmod +x it:</p>
<pre>
#!/bin/bash
~/pugs/util/smartlinks.pl --syn-dir ~/pugs/docs/Perl6/Spec --check $@
</pre>
<br /><p>
Then anywhere you want to test a set of files you can simply run</p>
<pre>
check_links --missing *.t
</pre>
<br /><p>
And it will list out all the files in the current directory with a .t extension that are missing smart links. This makes it much easier to work in a directory of tests and get a feel for what needs done.</p>
<h2 id="test_files_still_needing_links">Test files still needing links</h2>
<p>
(generated using smartlinks.pl --check --wiki <strong>/</strong>.t from within ~/pugs/t/spec)</p>
<p>
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/array_extending.t">S02-builtin_data_types/array_extending.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/array_extending.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/array_extending.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/array_mmd.t">S02-builtin_data_types/array_mmd.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/array_mmd.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/array_mmd.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/array_ref.t">S02-builtin_data_types/array_ref.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/array_ref.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/array_ref.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/assigning-refs.t">S02-builtin_data_types/assigning-refs.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/assigning=-refs.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/assigning=-refs.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/catch_type_cast_mismatch.t">S02-builtin_data_types/catch_type_cast_mismatch.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/catch_type_cast_mismatch.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/catch_type_cast_mismatch.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/flattening.t">S02-builtin_data_types/flattening.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/flattening.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/flattening.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/lists.t">S02-builtin_data_types/lists.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/lists.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/lists.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/nested_arrays.t">S02-builtin_data_types/nested_arrays.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/nested_arrays.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/nested_arrays.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/nested_pairs.t">S02-builtin_data_types/nested_pairs.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/nested_pairs.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/nested_pairs.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/subscripts_and_context.t">S02-builtin_data_types/subscripts_and_context.t<!-- wiki-renamed-hyperlink "S02=-builtin_data_types/subscripts_and_context.t"<http://svn.pugscode.org/pugs/t/spec/S02=-builtin_data_types/subscripts_and_context.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-literals/listquote-whitespace.t">S02-literals/listquote-whitespace.t<!-- wiki-renamed-hyperlink "S02=-literals/listquote=-whitespace.t"<http://svn.pugscode.org/pugs/t/spec/S02=-literals/listquote=-whitespace.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-literals/string-interpolation.t">S02-literals/string-interpolation.t<!-- wiki-renamed-hyperlink "S02=-literals/string=-interpolation.t"<http://svn.pugscode.org/pugs/t/spec/S02=-literals/string=-interpolation.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-literals/underscores.t">S02-literals/underscores.t<!-- wiki-renamed-hyperlink "S02=-literals/underscores.t"<http://svn.pugscode.org/pugs/t/spec/S02=-literals/underscores.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-magicals/config.t">S02-magicals/config.t<!-- wiki-renamed-hyperlink "S02=-magicals/config.t"<http://svn.pugscode.org/pugs/t/spec/S02=-magicals/config.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-magicals/dollar-underscore.t">S02-magicals/dollar-underscore.t<!-- wiki-renamed-hyperlink "S02=-magicals/dollar=-underscore.t"<http://svn.pugscode.org/pugs/t/spec/S02=-magicals/dollar=-underscore.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-magicals/pid.t">S02-magicals/pid.t<!-- wiki-renamed-hyperlink "S02=-magicals/pid.t"<http://svn.pugscode.org/pugs/t/spec/S02=-magicals/pid.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-magicals/progname.t">S02-magicals/progname.t<!-- wiki-renamed-hyperlink "S02=-magicals/progname.t"<http://svn.pugscode.org/pugs/t/spec/S02=-magicals/progname.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S02-whitespace_and_comments/pod-in-multi-line-exprs.t">S02-whitespace_and_comments/pod-in-multi-line-exprs.t<!-- wiki-renamed-hyperlink "S02=-whitespace_and_comments/pod=-in=-multi=-line=-exprs.t"<http://svn.pugscode.org/pugs/t/spec/S02=-whitespace_and_comments/pod=-in=-multi=-line=-exprs.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S03-junctions/autothreading.t">S03-junctions/autothreading.t<!-- wiki-renamed-hyperlink "S03=-junctions/autothreading.t"<http://svn.pugscode.org/pugs/t/spec/S03=-junctions/autothreading.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S03-junctions/basic.t">S03-junctions/basic.t<!-- wiki-renamed-hyperlink "S03=-junctions/basic.t"<http://svn.pugscode.org/pugs/t/spec/S03=-junctions/basic.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S03-operators/binding-closure.t">S03-operators/binding-closure.t<!-- wiki-renamed-hyperlink "S03=-operators/binding=-closure.t"<http://svn.pugscode.org/pugs/t/spec/S03=-operators/binding=-closure.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S04-blocks-and-statements/pointy-rw.t">S04-blocks-and-statements/pointy-rw.t<!-- wiki-renamed-hyperlink "S04=-blocks=-and=-statements/pointy=-rw.t"<http://svn.pugscode.org/pugs/t/spec/S04=-blocks=-and=-statements/pointy=-rw.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S04-statements/for-scope.t">S04-statements/for-scope.t<!-- wiki-renamed-hyperlink "S04=-statements/for=-scope.t"<http://svn.pugscode.org/pugs/t/spec/S04=-statements/for=-scope.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S04-statements/for_with_only_one_item.t">S04-statements/for_with_only_one_item.t<!-- wiki-renamed-hyperlink "S04=-statements/for_with_only_one_item.t"<http://svn.pugscode.org/pugs/t/spec/S04=-statements/for_with_only_one_item.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S04-statements/lazy.t">S04-statements/lazy.t<!-- wiki-renamed-hyperlink "S04=-statements/lazy.t"<http://svn.pugscode.org/pugs/t/spec/S04=-statements/lazy.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S04-statements/map-and-sort-in-for.t">S04-statements/map-and-sort-in-for.t<!-- wiki-renamed-hyperlink "S04=-statements/map=-and=-sort=-in=-for.t"<http://svn.pugscode.org/pugs/t/spec/S04=-statements/map=-and=-sort=-in=-for.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S05-grammar/namespace.t">S05-grammar/namespace.t<!-- wiki-renamed-hyperlink "S05=-grammar/namespace.t"<http://svn.pugscode.org/pugs/t/spec/S05=-grammar/namespace.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S05-grammar/ws.t">S05-grammar/ws.t<!-- wiki-renamed-hyperlink "S05=-grammar/ws.t"<http://svn.pugscode.org/pugs/t/spec/S05=-grammar/ws.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S05-mass/stdrules.t">S05-mass/stdrules.t<!-- wiki-renamed-hyperlink "S05=-mass/stdrules.t"<http://svn.pugscode.org/pugs/t/spec/S05=-mass/stdrules.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S05-match/arrayhash.t">S05-match/arrayhash.t<!-- wiki-renamed-hyperlink "S05=-match/arrayhash.t"<http://svn.pugscode.org/pugs/t/spec/S05=-match/arrayhash.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S05-match/blocks.t">S05-match/blocks.t<!-- wiki-renamed-hyperlink "S05=-match/blocks.t"<http://svn.pugscode.org/pugs/t/spec/S05=-match/blocks.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S05-match/non-capturing.t">S05-match/non-capturing.t<!-- wiki-renamed-hyperlink "S05=-match/non=-capturing.t"<http://svn.pugscode.org/pugs/t/spec/S05=-match/non=-capturing.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S05-modifier/sameaccent.t">S05-modifier/sameaccent.t<!-- wiki-renamed-hyperlink "S05=-modifier/sameaccent.t"<http://svn.pugscode.org/pugs/t/spec/S05=-modifier/sameaccent.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S06-advanced_subroutine_features/recurse.t">S06-advanced_subroutine_features/recurse.t<!-- wiki-renamed-hyperlink "S06=-advanced_subroutine_features/recurse.t"<http://svn.pugscode.org/pugs/t/spec/S06=-advanced_subroutine_features/recurse.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S06-advanced_subroutine_features/wrapping.t">S06-advanced_subroutine_features/wrapping.t<!-- wiki-renamed-hyperlink "S06=-advanced_subroutine_features/wrapping.t"<http://svn.pugscode.org/pugs/t/spec/S06=-advanced_subroutine_features/wrapping.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S06-currying/assuming-and-mmd.t">S06-currying/assuming-and-mmd.t<!-- wiki-renamed-hyperlink "S06=-currying/assuming=-and=-mmd.t"<http://svn.pugscode.org/pugs/t/spec/S06=-currying/assuming=-and=-mmd.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S06-signature/errors.t">S06-signature/errors.t<!-- wiki-renamed-hyperlink "S06=-signature/errors.t"<http://svn.pugscode.org/pugs/t/spec/S06=-signature/errors.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S06-signature/passing-arrays.t">S06-signature/passing-arrays.t<!-- wiki-renamed-hyperlink "S06=-signature/passing=-arrays.t"<http://svn.pugscode.org/pugs/t/spec/S06=-signature/passing=-arrays.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S06-signature/passing-hashes.t">S06-signature/passing-hashes.t<!-- wiki-renamed-hyperlink "S06=-signature/passing=-hashes.t"<http://svn.pugscode.org/pugs/t/spec/S06=-signature/passing=-hashes.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S06-signature/slurpy-params.t">S06-signature/slurpy-params.t<!-- wiki-renamed-hyperlink "S06=-signature/slurpy=-params.t"<http://svn.pugscode.org/pugs/t/spec/S06=-signature/slurpy=-params.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S06-signature/sub-ref.t">S06-signature/sub-ref.t<!-- wiki-renamed-hyperlink "S06=-signature/sub=-ref.t"<http://svn.pugscode.org/pugs/t/spec/S06=-signature/sub=-ref.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S10-packages/export.t">S10-packages/export.t<!-- wiki-renamed-hyperlink "S10=-packages/export.t"<http://svn.pugscode.org/pugs/t/spec/S10=-packages/export.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S10-packages/import.t">S10-packages/import.t<!-- wiki-renamed-hyperlink "S10=-packages/import.t"<http://svn.pugscode.org/pugs/t/spec/S10=-packages/import.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S10-packages/require_and_use.t">S10-packages/require_and_use.t<!-- wiki-renamed-hyperlink "S10=-packages/require_and_use.t"<http://svn.pugscode.org/pugs/t/spec/S10=-packages/require_and_use.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S12-attributes/inheritance.t">S12-attributes/inheritance.t<!-- wiki-renamed-hyperlink "S12=-attributes/inheritance.t"<http://svn.pugscode.org/pugs/t/spec/S12=-attributes/inheritance.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S12-class/namespaced.t">S12-class/namespaced.t<!-- wiki-renamed-hyperlink "S12=-class/namespaced.t"<http://svn.pugscode.org/pugs/t/spec/S12=-class/namespaced.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S12-methods/topic.t">S12-methods/topic.t<!-- wiki-renamed-hyperlink "S12=-methods/topic.t"<http://svn.pugscode.org/pugs/t/spec/S12=-methods/topic.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S12-role/namespaced.t">S12-role/namespaced.t<!-- wiki-renamed-hyperlink "S12=-role/namespaced.t"<http://svn.pugscode.org/pugs/t/spec/S12=-role/namespaced.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S16-io/basic-open.t">S16-io/basic-open.t<!-- wiki-renamed-hyperlink "S16=-io/basic=-open.t"<http://svn.pugscode.org/pugs/t/spec/S16=-io/basic=-open.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S29-list/mutating_listops.t">S29-list/mutating_listops.t<!-- wiki-renamed-hyperlink "S29=-list/mutating_listops.t"<http://svn.pugscode.org/pugs/t/spec/S29=-list/mutating_listops.t> --></a><br />
<a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/t/spec/S29-list/uniq.t">S29-list/uniq.t<!-- wiki-renamed-hyperlink "S29=-list/uniq.t"<http://svn.pugscode.org/pugs/t/spec/S29=-list/uniq.t> --></a></p>
</div>
]]></description>
<author>eric.hodges@hidden</author>
<guid isPermaLink="true">http://www.perlfoundation.org/perl6/index.cgi?smart_linking</guid>
<pubDate>Tue, 16 Dec 2008 19:16:44 -0000</pubDate>
</item>

</channel>
</rss>