Skip to content

Commit

Permalink
better example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 9, 2011
1 parent c2a1bc3 commit bf8b430
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -70,18 +70,22 @@ Tags and lines work pretty much the same, but depending on context one will
usually look a bit better.

<% my $i = 10; %>
Text before.
<% for my $j (1 .. $i) { %>
<%= $j %>
<% } %>
Text after.
<ul>
<% for my $j (1 .. $i) { %>
<li>
<%= $j %>
</li>
<% } %>
</ul>

% my $i = 10;
Text before.
% for my $j (1 .. $i) {
%= $j
% }
Text after.
<ul>
% for my $j (1 .. $i) {
<li>
%= $j
</li>
% }
</ul>

Semicolons get automatically appended to all expressions.
An additional equal sign can be used to disable escaping of the characters
Expand Down

0 comments on commit bf8b430

Please sign in to comment.