10. What can we do now?What can we do now?
➢Routing
➢ What the hell is routing :)
http://example.com/path/path
/path/path - is route- is route
we need to connect this route towe need to connect this route to CODECODE
get 'get '/path/path' => sub {' => sub {
return "Hello mammy :)";return "Hello mammy :)";
};};
13. Params in templatesParams in templates
[% IF session.logged_in %]
<form action="[% add_entry_url %]" method=post
class=add-entry>
Title:<input type=text size=30 name=title>
Text:<textarea name=text rows=5 cols=40></textarea>
<input type=submit value=Share>
</form>
[% END %]
14. Params in templatesParams in templates
<ul class=entries>
[% IF entries.size %]
[% FOREACH id IN entries.keys.nsort %]
<li><h2>[% entries.$id.title %]</h2>[% entries.$id.text %]
[% END %]
[% ELSE %]
<li><em>Unbelievable. No entries here so far</em>
[% END %]
</ul>