Skip to content
Browse files

updated Mojo::Template documentation a bit

  • Loading branch information...
1 parent 2d932b6 commit 66442bf1656ce0a9db760866c88fb4d94c491551 @kraih committed Aug 28, 2011
Showing with 18 additions and 21 deletions.
  1. +1 −1 Changes
  2. +9 −12 lib/Mojo/Template.pm
  3. +1 −1 lib/Mojolicious/Guides.pod
  4. +6 −6 lib/Mojolicious/Guides/Rendering.pod
  5. +1 −1 lib/Mojolicious/Plugin/Config.pm
View
2 Changes
@@ -992,7 +992,7 @@ This file documents the revision history for Perl extension Mojolicious.
- Added EXPERIMENTAL json method and json_class attribute to
Mojo::Message.
- Added EXPERIMENTAL idle_cb attribute to Mojo::IOLoop.
- - Added more perlish block syntax to Mojo::Template.
+ - Added more Perl-ish block syntax to Mojo::Template.
- Added non-blocking TLS handshake support to Mojo::IOLoop.
- Added proxy support to Mojo::Client.
- Added the ability to have dispatch plugins.
View
21 lib/Mojo/Template.pm
@@ -447,7 +447,7 @@ __END__
=head1 NAME
-Mojo::Template - Perlish Templates!
+Mojo::Template - Perl-ish Templates!
=head1 SYNOPSIS
@@ -483,27 +483,24 @@ projects.
Like preprocessing a config file, generating text from heredocs and stuff
like that.
- <% Inline Perl %>
+ <% Perl code %>
<%= Perl expression, replaced with result %>
<%== Perl expression, replaced with XML escaped result %>
<%# Comment, useful for debugging %>
<%% Replaced with "<%", useful for generating templates %>
- % Perl line
- %= Perl expression line, replaced with result
- %== Perl expression line, replaced with XML escaped result
- %# Comment line, useful for debugging
+ % Perl code line, treated as "<% line =%>"
+ %= Perl expression line, treated as "<%= line %>"
+ %== Perl expression line, treated as "<%== line %>"
+ %# Comment line, treated as "<%# line =%>"
%% Replaced with "%", useful for generating templates
=head2 Automatic Escaping
-Automatic escaping behavior can be reversed with the C<auto_escape>
-attribute, this is the default in L<Mojolicious> C<.ep> templates for
-example.
+Escaping behavior can be reversed with the C<auto_escape> attribute, this is
+the default in L<Mojolicious> C<.ep> templates for example.
<%= Perl expression, replaced with XML escaped result %>
<%== Perl expression, replaced with result %>
- %= Perl expression line, replaced with XML escaped result
- %== Perl expression line, replaced with result
L<Mojo::ByteStream> objects are always excluded from automatic escaping.
@@ -527,7 +524,7 @@ C<end> keywords.
<%= $block->('Baerbel') %>
<%= $block->('Wolfgang') %>
-=head2 Indenting
+=head2 Indentation
Perl lines can also be indented freely.
View
2 lib/Mojolicious/Guides.pod
@@ -98,7 +98,7 @@ Transparent CGI, FastCGI and PSGI support out of the box.
=item L<Mojo::Template>
-Very perlish and minimalistic template system.
+Very Perl-ish and minimalistic template system.
=item L<Mojo::ByteStream>
View
12 lib/Mojolicious/Guides/Rendering.pod
@@ -55,15 +55,15 @@ of the box called Embedded Perl or C<ep> for short.
It allows the embedding of Perl code right into actual content using a small
set of special tags and line start characters.
- <% Inline Perl %>
+ <% Perl code %>
<%= Perl expression, replaced with XML escaped result %>
- <%== Perl expression, replaced with raw result %>
+ <%== Perl expression, replaced with result %>
<%# Comment, useful for debugging %>
<%% Replaced with "<%", useful for generating templates %>
- % Perl line
- %= Perl expression line, replaced with XML escaped result
- %== Perl expression line, replaced with raw result
- %# Comment line, useful for debugging
+ % Perl code line, treated as "<% line =%>"
+ %= Perl expression line, treated as "<%= line %>"
+ %== Perl expression line, treated as "<%== line %>"
+ %# Comment line, treated as "<%# line =%>"
%% Replaced with "%", useful for generating templates
The simplest form is used to insert raw Perl code.
View
2 lib/Mojolicious/Plugin/Config.pm
@@ -103,7 +103,7 @@ __END__
=head1 NAME
-Mojolicious::Plugin::Config - Perlish Configuration Plugin
+Mojolicious::Plugin::Config - Perl-ish Configuration Plugin
=head1 SYNOPSIS

0 comments on commit 66442bf

Please sign in to comment.
Something went wrong with that request. Please try again.