Created
March 17, 2010 18:44
-
-
Save sharifulin/335581 to your computer and use it in GitHub Desktop.
Example template with virtual block in a Mojolicious
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
get '/' => 'index_with_block'; | |
shagadelic; | |
__DATA__ | |
@@ index.html.ep | |
<p><a href="/">Index</a></p> | |
bla bla bla | |
<p><a href="/">Index</a></p> | |
bla2 bla2 bla2 | |
<p><a href="/">Index</a></p> | |
@@ index_with_block.html.ep | |
<%{ content 'link' => %><p><a href="/">Index</a></p><%}%> | |
%= content 'link' | |
bla bla bla | |
%= content 'link' | |
bla2 bla2 bla2 | |
%= content 'link' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment