Calling LaiRu
LaiRu code can be called as raw source, as mixed templates, through includes, or from command-line scripts.
Target
LaiRu source appears in standalone files and in template files that contain literal output. A request normally starts at a page, evaluates LaiRu code where delimiters invoke it, and sends literal text and expression results to the response.
Use raw source for maintenance scripts and reusable libraries. Use templates when ordinary text, HTML, XML, or another output format should pass through with small islands of evaluated code.
Examples
Working pattern
1[2local(name) = 'Ada'3'Hello, ' + #name4]Use this as a focused starting point and adapt it in context.
Run raw source from the command line
1// hello.lasso2local(name) = 'Ada'3stdoutnl('Hello, ' + #name)Raw command-line source does not need template delimiters. Run it with `lairu run hello.lasso`.
Render a mixed template
1[2local(title) = 'Welcome'3]4<h1>[#title]</h1>5<p>Generated by LaiRu.</p>Use `lairu render page.lasso` for template files that mix text and code.