%# -- start test component-- you should not see this line output
<html>
 <head>
  <title>Mason test</title>
 </head>
 <body>
  <h1> Mason test </h1>

% if ($r->auth_type) {
<p> Hello, &quot;<% $r->connection->user %>&quot; (<% $r->auth_name %>) </p>
% }

% for my $t (@$myvar) {
  <p> <% $t %> </p>
% } 

<hr>
<p> This test compoent accessed <%$counter%> times so far </p>
<address> <%$r->server->server_hostname%>:<%$r->server->port%> </address>

 </body>
</html>
<%init>
 my $myvar = ["hello world", "welcome to the test mason component"];

 # No, this is not a good example of how to implement a counter.
 my $counter = $m->cache->get("counter");
 if (!$counter) {
   $m->cache->set("counter", $counter = 1, "1h");
 }
 else {
   $m->cache->set("counter", ++$counter, "1h");
 }

</%init>
%# -- end test component-- you should not see this line output
