Last active
August 29, 2015 14:04
-
-
Save hkoba/5183295fb9260415dc47 to your computer and use it in GitHub Desktop.
dev-embedded test
This file contains 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; | |
use YATT::Lite::Embed; | |
foreach my $name ($YATT->list_public_items) { | |
get "/$name" => sub { | |
my ($self) = @_; | |
# $self->render(text => 'Hello!'); | |
$self->render(text => $YATT->render($name)); | |
}; | |
} | |
app->start; | |
__DATA__ | |
<!yatt:args user> | |
<h2>Hello! &yatt:user;</h2> | |
<!yatt:page foo user> | |
This is foo, &yatt:user; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment