Skip to content

Commit

Permalink
fixed examples in rendering guide
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 17, 2012
1 parent c389c6d commit 3c7b999
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -38,10 +38,12 @@ the C<DATA> section of the class C<main>.
__DATA__

@@ time.html.ep
% use Time::Piece;
% my $now = localtime;
<!DOCTYPE html>
<html>
<head><title>Time</title></head>
<body><%= localtime time %></body>
<body>The time is <%= $now->hms %>.</body>
</html>

@@ hello.txt.ep
Expand Down Expand Up @@ -514,8 +516,9 @@ helper you can go one step further and prevent template blocks from getting
executed more than once.

@@ cached.html.ep
% use Time::Piece;
%= memorize begin
This template was compiled at <%= localtime time %>.
This template was compiled at <%= localtime->hms %>.
% end

=head2 Adding helpers
Expand Down

0 comments on commit 3c7b999

Please sign in to comment.