Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Inside of app.pm6:
- #--
- use Bailador;
- Bailador::import;
- get / ^ '/blog/' \d+ $ / => sub ($post) {
- template 'blog.tmpl',{ post => $post }
- }
- #--
- # Inside of blog.tmpl:
- #--
- % my ($h) = @_;
- <html>
- <body>
- <%= slurp "posts/{$h<post>}.html" %>
- </body>
- </html>
- #--
- # Output:
- #--
- # Too many positionals passed; expected 0 arguments but got 1
- #--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement