Created
April 26, 2012 17:11
-
-
Save tadzik/2501044 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 my $tmpl-project = ' | |
101 <tr><td style="border-bottom:1px dotted #98CAEB">%s</td> | |
102 <td><div class="%s">%s</div></td> | |
103 <td><div class="%s">%s</div></td> | |
104 <td><div class="%s">%s</div></td> | |
105 <td> | |
106 <a href="%s">Github</a> | |
107 </td> | |
108 </tr> | |
109 '; | |
119 multi gen-result(Pies::Project $p, True) { | |
120 my $name = $p.name; | |
121 my $url = url($p); | |
122 say sprintf $tmpl-project, $name, good(), good(), good(), $url; | |
123 sprintf $tmpl-project, $p.name, good(), good(), good(), url($p) | |
124 } | |
Results in: | |
# first call | |
<tr><td style="border-bottom:1px dotted #98CAEB">Acme::Meow</td> | |
<td><div class="implemented">+</div></td> | |
<td><div class="implemented">+</div></td> | |
<td><div class="implemented">+</div></td> | |
<td> | |
<a href="http://github.com/tadzik/perl6-Acme-Meow">Github</a> | |
</td> | |
</tr> | |
# second call | |
';' is not a valid sprintf format |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment