Changes

From SME Server
Jump to navigationJump to search
Line 474: Line 474:  
</syntaxhighlight>All Mojolicious commands are indicated by a "%" in the first non space character. If the next character is an equals sign then the result of the expression is output.
 
</syntaxhighlight>All Mojolicious commands are indicated by a "%" in the first non space character. If the next character is an equals sign then the result of the expression is output.
   −
Lines which do not start with a "%" are output anyway (and are usually htrml tags).
+
This is the best list I have found of the ep formats:<syntaxhighlight lang="text">
 +
<% Perl code %>
 +
<%= Perl expression, replaced with XML escaped result %> Useful to be embedded in a line of html
 +
<%== Perl expression, replaced with result %> (useful if the perl code emitts html tags)
 +
<%# Comment, useful for debugging %>
 +
<%% Replaced with "<%", useful for generating templates %>
 +
% Perl code line, treated as "<% line =%>" (a full line of perl)
 +
%= Perl expression line, treated as "<%= line %>" (a full line of perl replaced by the result)
 +
%== Perl expression line, treated as "<%== line %>" (ditto, but allows html tags)
 +
%# Comment line, useful for debugging
 +
%% Replaced with "%", useful for generating templates
 +
</syntaxhighlight>Lines which do not start with a "%" are output anyway (and are usually htrml tags).
    
More details about the content of the .ep files are available [https://docs.mojolicious.org/Mojolicious/Guides/Rendering#toc here] and [https://docs.mojolicious.org/Mojolicious/Plugin/DefaultHelpers here].
 
More details about the content of the .ep files are available [https://docs.mojolicious.org/Mojolicious/Guides/Rendering#toc here] and [https://docs.mojolicious.org/Mojolicious/Plugin/DefaultHelpers here].

Navigation menu