{"action":"created","issue":{"url":"https://api.github.com/repos/kraih/mojo/issues/732","labels_url":"https://api.github.com/repos/kraih/mojo/issues/732/labels{/name}","comments_url":"https://api.github.com/repos/kraih/mojo/issues/732/comments","events_url":"https://api.github.com/repos/kraih/mojo/issues/732/events","html_url":"https://github.com/kraih/mojo/issues/732","id":54292700,"number":732,"title":"The description in Rendering.pod is a little bit confusing","user":{"login":"henryan","id":10480617,"avatar_url":"https://avatars.githubusercontent.com/u/10480617?v=3","gravatar_id":"","url":"https://api.github.com/users/henryan","html_url":"https://github.com/henryan","followers_url":"https://api.github.com/users/henryan/followers","following_url":"https://api.github.com/users/henryan/following{/other_user}","gists_url":"https://api.github.com/users/henryan/gists{/gist_id}","starred_url":"https://api.github.com/users/henryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryan/subscriptions","organizations_url":"https://api.github.com/users/henryan/orgs","repos_url":"https://api.github.com/users/henryan/repos","events_url":"https://api.github.com/users/henryan/events{/privacy}","received_events_url":"https://api.github.com/users/henryan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kraih/mojo/labels/needs+feedback","name":"needs feedback","color":"eeeeee"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-14T07:38:40Z","updated_at":"2015-01-14T16:26:48Z","closed_at":null,"body":"I find my self very confused by the description of the syntax (since line 70) in lib\\Mojolicious\\Guides\\Rendering.pod.  I'm wondering if this could be improved. \r\n\r\n<% Perl code %>\r\n<%= Perl expression, replaced with result %>\r\n<%== Perl expression, replaced with XML escaped result %>\r\n<%# Comment, useful for debugging %>\r\n<%% Replaced with \"<%\", useful for generating templates %>\r\n% Perl code line, treated as \"<% line =%>\"\r\n%= Perl expression line, treated as \"<%= line %>\"\r\n%== Perl expression line, treated as \"<%== line %>\"\r\n%# Comment line, useful for debugging\r\n%% Replaced with \"%\", useful for generating templates\r\n\r\nWhat confused me are:\r\n1. What's Perl code ? What's Perl expression? What's Perl code line? What are the differences between them? \r\nIs a variable itself considered an expression in Perl ?\r\nIt seems to me that the Perl expression here means Perl expression and Perl variable. \r\nIt seems to me that <% Perl code %> is the start or end of the Perl code block in the template\r\n2. What's \"<% line =%>\" ? It is only mentioned once in the syntax description, What does it has in difference to the \"<%= line %>\"  or \"<% line %>\" \r\n3. It would be more helpful if the document can provide sample and its output as well.\r\nFor example, line 132 of this pod, \r\n<%= All whitespace characters around this expression will be trimmed =%>\r\nI tried several times to figure out what it really means by writing a testing script containing code snippet like the following\r\n<%= $var1 =%>     after space\r\n\r\nAnother possible issue is in lib\\Mojo\\Template.pm, line 310\r\n  % my ($num, $text) = @_;\r\nthe variable $text is never used after it is declared\r\n "},"comment":{"url":"https://api.github.com/repos/kraih/mojo/issues/comments/69943660","html_url":"https://github.com/kraih/mojo/issues/732#issuecomment-69943660","issue_url":"https://api.github.com/repos/kraih/mojo/issues/732","id":69943660,"user":{"login":"kraih","id":30094,"avatar_url":"https://avatars.githubusercontent.com/u/30094?v=3","gravatar_id":"","url":"https://api.github.com/users/kraih","html_url":"https://github.com/kraih","followers_url":"https://api.github.com/users/kraih/followers","following_url":"https://api.github.com/users/kraih/following{/other_user}","gists_url":"https://api.github.com/users/kraih/gists{/gist_id}","starred_url":"https://api.github.com/users/kraih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kraih/subscriptions","organizations_url":"https://api.github.com/users/kraih/orgs","repos_url":"https://api.github.com/users/kraih/repos","events_url":"https://api.github.com/users/kraih/events{/privacy}","received_events_url":"https://api.github.com/users/kraih/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T16:26:48Z","updated_at":"2015-01-14T16:26:48Z","body":"Otherwise i have to agree with @niczero, those are all very generic terms. If there are ways to make it easier to grok, i'm of course in favor of that, but i don't think that's the case here yet."}}